IT |
ITmedia 総合記事一覧 |
[ITmedia News] ウィズコロナ時代に深刻化するデジタルディバイド |
https://www.itmedia.co.jp/news/articles/2105/31/news163.html
|
itmedia |
2021-05-31 21:38:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia News] iPad Pro 2021に対する「お、おう」感を分析する |
https://www.itmedia.co.jp/news/articles/2105/31/news162.html
|
itmedianewsipadpro |
2021-05-31 21:34:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia Mobile] ドコモ、「Xperia 1 III/10 III」「AQUOS R6」などの価格を案内 |
https://www.itmedia.co.jp/mobile/articles/2105/31/news159.html
|
aquosr |
2021-05-31 21:13:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia News] VAIOの新社長に山野正樹氏 引き続き“筆頭株主”からの出向 山本社長は取締役に |
https://www.itmedia.co.jp/news/articles/2105/31/news160.html
|
itmedianewsvaio |
2021-05-31 21:05:00 |
AWS |
lambdaタグが付けられた新着投稿 - Qiita |
AWS LambdaでRDSのdump-restoreするための設定(SAM) |
https://qiita.com/ksilverwall/items/8fe49c390934b9477dfb
|
|
2021-05-31 21:06:05 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
【python】YoutubeAPIを用いてオーディンション番組動画の情報を取得する |
https://qiita.com/zawakou_dx/items/bbad47abd9d2ca2525d9
|
videoresultselfyoutubevideoslistリソースプロパティの指定partstatistics取得する情報のフィルタリングidsearchresultidvideoIdexecuteどんな情報が取れるかは以下を参照。 |
2021-05-31 21:49:18 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
Pythonのリストから括弧を除く |
https://qiita.com/quwtoy/items/5327128e6e9797383206
|
pylistabcprintlistgtgtabc |
2021-05-31 21:17:16 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
axios.getの処理の流れをまとめてみた |
https://qiita.com/Takanori30907/items/26e0244d983123f900c1
|
非同期通信って何本来、Webブラウザの閲覧を行う際には①WebブラウザクライアントがウェブサイトサーバーにHTTPリクエストを送る②サーバーが処理を行い、その結果をブラウザに返す③ブラウザがそれを表示することで、ユーザーがウェブページを見ることができるという流れがあり、その処理を行う最中には他の処理スクロールして他の情報を閲覧する、等が出来ない仕組みでした。 |
2021-05-31 21:53:13 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
SlackにTrelloのカード一覧を表示させる拡張機能を作成しました |
https://qiita.com/zinc0765/items/5d402bbb69e1048d271b
|
今回は、「指定したユーザがメンバーになっているカード」の、「タイトル」と「期限」を取得しています。 |
2021-05-31 21:12:04 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
Tensorflowをインストールしたいです |
https://teratail.com/questions/341442?rss=all
|
|
2021-05-31 21:56:52 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
CLionでのOpenCvの実装 |
https://teratail.com/questions/341441?rss=all
|
CLionでのOpenCvの実装前提・実現したいことここに質問の内容を詳しく書いてください。 |
2021-05-31 21:53:52 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
スライドショーにタイピング風の文字をいれたいです |
https://teratail.com/questions/341440?rss=all
|
文字 |
2021-05-31 21:50:54 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
PHPで昇順のソートをsort関数ではない方法で作りたい。 |
https://teratail.com/questions/341439?rss=all
|
PHPで昇順のソートをsort関数ではない方法で作りたい。 |
2021-05-31 21:38:32 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
Vuexのactionsで値をmutationsに渡す方法が分からない |
https://teratail.com/questions/341438?rss=all
|
Vuexのactionsで値をmutationsに渡す方法が分からないVuexでactions内で非同期処理をする際、responceからきたデータを加工してmutationsに渡して表示する処理を書いています。 |
2021-05-31 21:30:05 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
Python(selenium)での自動ログインができない |
https://teratail.com/questions/341437?rss=all
|
Pythonseleniumでの自動ログインができない前提・実現したいこと教習所のログインページに移動し、ID、パスワードを入力して自動ログインをしたいです。 |
2021-05-31 21:16:28 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
【Atcoder】PythonだとACになるがPyPyだとTLEになる |
https://teratail.com/questions/341436?rss=all
|
【Atcoder】PythonだとACになるがPyPyだとTLEになる前提・実現したいことAtcodernbspTypicalnbspContestnbspnbspAnbsp深さ優先探索について、のコードはPythonnbsp、PyPynbspのどちらで提出してもACになりますが、のコードをPyPynbspで提出すると、個のテストケースでTLE、MLEになります。 |
2021-05-31 21:12:44 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
ゲーム終了後ミスタイプ数の表示 |
https://teratail.com/questions/341435?rss=all
|
ゲーム終了後ミスタイプ数の表示実現したいこと現在タイピングゲームを作成しています。 |
2021-05-31 21:10:14 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
A列の数値が入力されたら、隣り合うB列の数値を表示したい |
https://teratail.com/questions/341434?rss=all
|
|
2021-05-31 21:03:00 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
使っていないEBSボリュームをcliでサクッと全部削除する |
https://qiita.com/instant_baby/items/666f9409806b358539d3
|
使っていないEBSボリュームをcliでサクッと全部削除するOpsWorksやらAutoscale等々、検証でECをぽんぽこ立てたり消していると何だかんだで溜まっていくavailableのEBSそういやどうだったかなと調べてみるとなんと台以上もどうせ使ってないしそもそもこれはヤバいということでawsコマンドを使用して使っていないEBS一覧を取得し、それをforで回してパワーで消していくのが本題です。 |
2021-05-31 21:45:58 |
Docker |
dockerタグが付けられた新着投稿 - Qiita |
Docker非対応のNAS上でDockerを動かしてみた |
https://qiita.com/AtsushiYokokawa/items/72157a676866296d8bbe
|
再起動完了後、TerminalからNASへSSH接続し、以下コマンドを実行し、エラーなく出力されることを確認します。 |
2021-05-31 21:14:50 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
axios.getの処理の流れをまとめてみた |
https://qiita.com/Takanori30907/items/26e0244d983123f900c1
|
非同期通信って何本来、Webブラウザの閲覧を行う際には①WebブラウザクライアントがウェブサイトサーバーにHTTPリクエストを送る②サーバーが処理を行い、その結果をブラウザに返す③ブラウザがそれを表示することで、ユーザーがウェブページを見ることができるという流れがあり、その処理を行う最中には他の処理スクロールして他の情報を閲覧する、等が出来ない仕組みでした。 |
2021-05-31 21:53:13 |
技術ブログ |
Developers.IO |
【レポート】【基本の AWS サービス】Amazon FSx と Amazon EFS によるファイルベースストレージのモダナイズ / スケール / 保護 #AWS-42 #AWSSummit |
https://dev.classmethod.jp/articles/awssummit-2021-aws-42/
|
amazonefs |
2021-05-31 12:46:02 |
技術ブログ |
Developers.IO |
[小ネタ]AWS OrganizationsのSCPで特定リージョンのみ使用できるようにする |
https://dev.classmethod.jp/articles/scp-region-limit/
|
awsorganizations |
2021-05-31 12:20:01 |
海外TECH |
DEV Community |
Day 12/30 : Responsive Pricing Card tables using HTML and CSS |
https://dev.to/somanathgoudar/day-12-30-responsive-pricing-card-tables-using-html-and-css-308e
|
Day Responsive Pricing Card tables using HTML and CSSWelcome to Day of this Challenge This is what I created today ➜Here is the Demo ➜Video Tutorial ➜Source Code ➜Instagram Post and Reel for Day See Post and ReelHey If You don t know what is happening here Don t Worry I am doing a crazy challenge Read More about it from the post below DaysChallenge Days Extreme HTML amp CSS CHALLENGE Somanath Goudar・May ・ min read html webdev frontend daysofcode Support Me Buy me a Coffee Follow Me on InstagramFollow Future Coders on InstagramSubscribe to My Main ChannelSubscribe to Channel Created for this Challenge |
2021-05-31 12:53:00 |
海外TECH |
DEV Community |
3 ways to clone in JS |
https://dev.to/deyrupak/3-ways-to-clone-in-js-36cp
|
ways to clone in JSObjects in JavaScript are reference values you can t simply just copy using the Save It For Later Let s begin const food a apple b burger Spread food Object assignObject assign food JSONJSON parse JSON stringify food Result a apple b burger Do you know the difference between these ways Comment down below |
2021-05-31 12:42:22 |
海外TECH |
DEV Community |
Learning Web Dev on the Web |
https://dev.to/lucidmach/learning-web-dev-on-the-web-ifp
|
Learning Web Dev on the WebThey say the best place to learn football is on a football field likewise the best place to learn web dev is the web There are a lot of places on the web from where you can learn for free YouTubeUdemyDEV MediumTwitter yes a lot of people tweet about web dev But as a beginner it s very likely that you d prolly choose YouTube and since YouTube has a hell lot of channels to choose from finding a channel that has a style you really enjoy would play a major role in learning journey Here s a list of my fav channels and soon enough even yours Net Ninja This is my go to channel for literally anything web Shaun has this tendency to super simplify any concept to a form that literally a yo can understand He has playlist on topics in which he explains concepts as we build a project However Shaun likes to take his time so if you ve some dead lines to meet This is definitely not the right channel for the situation Traversy Media Brad Traversy is the OG web dev youtuber A lot of people who make web dev tutorials on YouTube have claimed to have learnt from his videos His videos have this natural style that makes it seem like you re learning from a actual teacher in person He teaches you all the essentials the with which you can get of the work done WebDevSimplified Kyle is an kinda like the best of both worlds from Net Ninja and Traversy Media His goal as a YouTuber is simplifying the web so you can build your dream projects sooner which he absolutely aces His videos tend to be crisp and to the point so if you want a fundamental understanding of concepts while killing your dead lines this is the best channel for the situation Dev Ed This is the YouTuber I personally best relate to His videos focus on showing you how to think in terms of both design and development His videos are absolutely delightful and fun to watch He is the PewDiePie of Web Dev YouTube Ben Awad Ben has been an inspirational figure role model to me He builds real projects that he deploys and monetizes right in front of us He s also THE YouTuber to learn React JS graphQl and TypeScript from His content is filled with wit and dark humor kinda and is absolutely fun to watchIf you ️this post Do hit me up on Twitter LucidMachThanks For The Read ️ lucidmach |
2021-05-31 12:32:56 |
海外TECH |
DEV Community |
From Junior to Senior Software Engineer at Klarna in 2.5 years |
https://dev.to/getworkrecognized/from-junior-to-senior-software-engineer-at-klarna-in-2-5-years-267
|
From Junior to Senior Software Engineer at Klarna in yearsA promotion to senior level in a software engineering career brings many benefits More compensation more responsibilities and a better position in your career progression Getting promoted is difficult though But let me tell you how I have applied simple tips and tricks to get promoted to senior level at Klarna one of the technology companies in Europe After graduating from university in in Germany I found a job based on an internship done during graduation A small startup But after years I could not see my career progressing so quickly and growth opportunities were rare So I decided to look around and after many rejections I got an interview at Klarna I do not know how but I completed the interview and got an offer and was hired as a Junior Software Engineer A reason I wanted to join Klarna was that finally I would have many other software engineers around me that would teach me how to build products at scale In startups the requirements for a software engineer are completely different from what big companies want You need to focus more on the product Have to tinker with marketing and work closely with Sales It is a great opportunity for most people since you will learn a variety of skills In the end the dream of most software engineers is to work at a big company You will have more dedicated time to actually focus on engineering and of course the money is better as well So let us look at what my progression at Klarna has been like Career Levels at KlarnaKlarna is really good at telling at which stage in your career you really are They have a detailed career ladder based on different metrics These metrics are symbolized through Leadership Principles Customer obsessionDeliver resultsLet the team shineChallenge the status quoStart small and learn fastCourageHire and develop exceptional talentDetailed thinkersBased on these leadership principles there is a matrix that is built up similar to something like this Level Customer obsession An employee can put themself into the shoes of the customerAn employee understands how working on specific tasks helps customersLevel Customer obsession An employee is able to create tickets based on customer s needsAn employee deeply cares for the customer and builds features that overdeliver on the scope of the ticketThere are of course a lot more levels for employees at Klarna Currently employees range from Level to Level where for Software Engineers level is Junior and level is senior Further levels are harder to achieve and split up into an Individual contributor or management path which will be discussed later Initial rating during the hiring processDuring your interviews with Klarna you will get rated against these principles Klarna s interview process is quite standard in the technology industry and is built similar to this Recruiter callHomework task Leetcode style questionsOn Site normally a review of the homework task additional whiteboarding problemSystem DesignBehavioral Interview with the hiring managerDuring this process and based on your resume you will get rated Is this process fair Might be but you always have the option to negotiate your level at that stage Especially the round about system design will decide how you get leveled Personally I had little to no experience with system design tasks before since working in a startup did not expose me to such things Luckily the system design primer guide exists that you can learn with and excel at those tasks Promotion roundsAs within every bigger company there is a promotion window at Klarna It appears to happen once to twice per year even though the process is currently changing But the windows are build up the same Normally you start a conversation with your manager first when the promotion window is coming up months before and in that conversation you have to feel if your manager is willing to put in your promotion request Once this is validated you can ask them in the same meeting if it would be ok to send out feedback for a degree review This means that you send out a form to all your colleagues and they rate you Of course against the leadership principles This can take some time Once you have received all the feedback you gather and summarize it and present it to your manager Your manager then has to decide if they put you forward to the next round of the promotion process If they decide on it then you have to basically write a short elevator pitch on why you should get promoted That should be really short and be readable within a minute Once that is done the control is out of your hand The promotion case will be discussed in a bigger group of engineering managers and stakeholders Once approved you will receive your promotion I went through that process twice and what really helped me was reminding my colleagues of what I have done in the past months or year Most of the employees forget what they have done themself in the past period so they will definitely not remember what you have achieved For this I track my work on a daily basis and before sending out the form to collect feedback I am summarizing my achievements in a small brag document to pages long This will help my colleagues to remind them of where we actually worked together This brag document I will attach to the form to collect feedback so the colleagues have an easy way to fill out the form The career path for a software engineer at KlarnaThe engineering paths in Klarna are described quite clearly As a software engineer you will rise through the ranks from junior to senior normally with a focus on management but also contributing characteristics Once reaching the senior level you will have to learn what you want to do in the future life Stay on the individual contributor path or go into management Both paths are valid approaches Up to senior level it will not really make a difference on what you focus on you need to have a substantial amount of skills within core engineering but also management Opportunities I tookSo how did I rise through the ranks As there is a system with rising through the ranks you can game the system of course There are different parameters that you will work on during the promotion process but it is of course an individual approach Once I landed at Klarna I realized people give a lot of thought to leadership principles If it is about product decisions or just how to implement a new feature The leadership principles should be applied A good way to see that is in the discussion If someone s decision is violating the leadership principles a lot of people will argue against that decision In general it is driving the development at Klarna forward So make use of these leadership principles in discussions Follow the career ladderAs said before Klarna focuses a lot on Leadership Principles In my first promotion feedback round I got a lot of stellar feedback but also a lot of points on what to improve on I had a lot of on s with my manager to focus on my growth goals For example we discussed what I could do within the next month regarding development work that will help me At the beginning at Klarna I struggled with the “Let the team shine principle a lot I did not had ideas on how to present the team So my manager proposed different things Join a group outside of the team for voluntarily work like maintaining third party libraries used by the team within KlarnaOr joining the engineering blogging or open source groupI decided on the second step and quickly checked what is needed to get to the next level to fulfill these requirements I represented my team within those meetings but also myself But also on the team side I got assigned to interesting tasks that helped me to grow Working on creating new services and making sure they are scalable to millions of requests I got put together with more senior engineers to do pair coding with them but we also include mob programming within our team a technique where the whole team gets together and codes something These things really helped me to go from level to level For the transition from level to level the circumstances are a bit different You have to work on different categories that are mentioned now Lead the TeamWhen reaching level and trying to get to level another skill is getting a lot more important Leadership What does this mean As a senior engineer Klarna expects from you two important things basically Can you influence the product and lead implementations that your team creates or you come up with Are you teaching people to code in a well way and can make developers at Klarna more efficient All of these things can be tackled and be focused on Once I reached level I put a lot of focus on that I introduced the technique of creating technical design documents in our team These are documents that sketch out the feature and architecture They also lead the conversation about trade offs of implementations and are living documents for taking decisions with the product manager It helps us to get a clear mind about a feature Once that is done it is collaboration time with your product owner on creating JIRA tickets for that feature Once tickets are estimated and assigned maybe go over them with the assigned person to help them understand each part of the ticket Be descriptive in the ticket descriptions and help to give pointers on what to look out for This is especially useful for team members that are new to the team What I always like to do is pasting the paths of the core files that would need to be touched for the files Based on that even junior developers would be able to code the feature mostly independently This gets us to the next point as well Leading developers To get to level at Klarna you have to support the engineers in your team It is more a job of educating and pair coding with them Give them space and the right tips and the right time This is important for your team level But it can get even more important outside of the team Opportunities outside of your teamAs mentioned before teaching developers to be more efficient outside of your team is also a huge priority to get promoted to level Next to it it becomes important that you work together with people outside of your team This will eventually bobble up to other engineering managers that you are doing good work with their engineers There are different activities like changing code for other teams and so on Just receiving recognition I did it a bit differently Within the DomainAt Klarna we have a concept called domains Domains are small subsections of the business For example we have a merchant domain that just deals with the merchant aspect of the business but also a domain for the Klarna app Some are more BB focused some more on the BC side Overall you can say the teams work closely together but each team has its own KPIs But what becomes more important are the domain KPIs Your team s KPIs will be looked at by some people but if you made larger contributions to the domain s KPIs people will start recognizing you For example in our domain we are using a monorepo A big repository that holds almost all services used in our domain Improving this monorepo helps everyone in your domain to build better products and focus on features and implementation rather than infrastructure I found many tasks like that like creating a project to automatically update package dependencies throughout the monorepo This will give you exposure to a wide audience and will make your case for promotions stronger Open SourceMost of the technology companies promote open source in one way or the other For Klarna it was always the plan to open source part of the software to give back to a community of developers The process was not there so the company initiated a group regarding open source at Klarna This group was the catalysator to set up a workflow make sure legal requirements are met and promoting open source when possible I joined that group initially and build up the processes and many more things regarding the topic For example we wanted to have an incubator set up where projects live in private first before getting open sourced This and many other smaller projects helped me work with various other engineers and get recognition I even presented the results of a hackathon during an engineering all hands meeting in front of the hundreds of engineers working at Klarna challenging but rewarding BloggingBranding is really important for Klarna It blends in with their leadership principle called “Hire and develop exceptional talent Blogging about the technology used at Klarna will help with hiring in the long term because it will create some kind of trust in people applying The biggest companies blogging about their technology are probably Airbnb Engineeering amp Data ScienceThe Netflix Tech BlogUber EngineeringPinterest EngineeringLyft EngineeringAll of them succeed because of great engineers that get hired And part of the reason might be the blog as well By sharing technological information you can create an environment of learning and discovering new things I helped authors within Klarna to create blog articles I found ideas and asked if people would be willing to create a blog article regarding some interesting topics I helped them with graphics copywriting proofreading and many other things And here is the important part again I worked with other engineers They will know about me and their manager will most likely also know about me by then A better standing for me in the company Be proactive Think aheadA big part of my promotion rounds was that I was proactive in my action plans and projects It all starts with asking for feedback I prepare other people to remember what I have done so they can give me feedback in an easier way I focus on my weaknesses and try to improve them actively In general I was also looking at what the company s or domain s KPIs were and how they played with the KPIs of our team I challenged my product owner a lot and made it clear that I want to work on certain things because it will help the company in the long term I also had the opportunity to join a temporary team dealing with major support problems that were brought up at the domain level It was great exposure to a new development space I worked again with many new people but most importantly we solved the domain s problems in record time It was stressful but rewarding and the promotion was part of it Look out for teams or projects that will help the company grow Do not just sit there and grind the tickets you are assigned to Write up your achievementsAn important part of my journey was gathering feedback and having strong evidence of my achievements How have I made this possible I wrote it down Writing is an essential skill in your career but keeping a work diary is not difficult Just at the end of every day write up what you have done throughout the day Remind yourself of your weaknesses and how you improved them Keeping these notes will be super important With getworkrecognized I tracked more than a year of work notes and it helped me to write my self review but also receive stellar performance reviews from my peers A simple system I have used is to track all work but tag the notes Assign them to the leadership principles Klarna has and you will see where you have to grow or where you need to focus on in the next weeks a bit more Make a plan and put some tasks around that into the sprint or your upcoming weeks |
2021-05-31 12:23:50 |
海外TECH |
DEV Community |
Menu / Sidebar toggle functionality with pure CSS and no JavaScript. |
https://dev.to/swastikyadav/menu-sidebar-toggle-functionality-with-pure-css-and-no-javascript-1je6
|
Menu Sidebar toggle functionality with pure CSS and no JavaScript In this post we will explore how we can create a toggle functionality for Menu SideBar with pure CSS and no JavaScript Toggle functionality is often built with JavaScript because it requires handling the click event But it can be built with pure CSS and no JavaScript Here is how The MarkupLet s start with a simple tag for the sidebar HTML lt aside class aside wrapper gt lt h class logo text gt lt span gt Qpay lt span gt lt i class fas fa bars sidebar toggle gt lt i gt lt h gt lt ul gt lt li gt lt i class fas fa home gt lt i gt Home lt li gt lt li gt lt i class fas fa building gt lt i gt Company lt li gt lt li gt lt i class fas fa dollar sign gt lt i gt Perks lt li gt lt li gt lt i class fas fa file contract gt lt i gt Legal lt li gt lt li gt lt i class fas fa credit card gt lt i gt Payments lt li gt lt ul gt lt ul gt lt li gt lt i class fas fa headset gt lt i gt Get Help lt li gt lt li gt lt i class fas fa comment gt lt i gt Chat With Us lt li gt lt ul gt lt aside gt Add input type checkboxJust above the aside tag add an input type checkbox HTML lt input type checkbox id toggler checked gt lt aside class aside wrapper gt lt h class logo text gt lt span gt Qpay lt span gt lt i class fas fa bars sidebar toggle gt lt i gt lt h gt lt aside gt Toggle SidebarNow based on the checked Unchecked state of the input we can show and hide the sidebar in CSS The below code snippet says If the input is checked move the sidebar to the left by px px is the width of the sidebar CSS Toggler Functionality input checked aside left px Now toggling the checkbox will show and hide the sidebar Hamburger MenuBut we want this to work when we click on the hamburger not on the checkbox Hide the input display none Wrap the hamburger menu in a label tag with the for attribute Id of input checkbox and for attribute for the label should be the same This will trigger the checkbox when we click on hamburger icon HTML lt Input checkbox ID toggler gt lt input type checkbox id toggler checked gt lt aside class aside wrapper gt lt h class logo text gt lt span gt Qpay lt span gt lt Label FOR toggler gt lt label for toggler gt lt i class fas fa bars sidebar toggle gt lt i gt lt label gt lt h gt lt aside gt And that s it We created a toggle functionality without JavaScript Here is a complete live demo with the codebase If you enjoyed this post found it useful or felt happy please consider subscribing to my Weekly NewsLetter Thank You |
2021-05-31 12:11:39 |
海外TECH |
DEV Community |
Twitter bot in Node.Js |
https://dev.to/neer17/twitter-bot-in-node-js-329
|
Twitter bot in Node Js I bet you have wondered to automate some stuff on your social media let s do some then With this bot we are going to DM anyone who follows us or likes our tweet Here we are going to make use of the Account Activity API in order to consume follow and like events from our account Section Environment SetupSTEP Make a Twitter account or use an existing one and add an app to that by going to the following URLP S I would recommend to make a separate account to deploy the bot on STEP Go to app and get following from keys and tokens section API key secret Bearer Token Access token and secret Enable legged authentications to add callback URL for webhook A callback URL is required to register a webhook in order to consume events that would happen on our app read more about it here Set up the dev environment by going to Products gt Dev Environments form the sidebar and name all of them dev Give Read Write and Direct Messages permissions form the App permissions section STEP Install the following dependencies to use the Twitter APIs in Node jstwitter litedot envtwitter webhookexpressbody parserSTEP Download and install ngrok to get a HTTPS URL for our local ports and to check the bot working before deploying it to Heroku Section Securing API keysSTEP First make bot js file as entry point to our app Then by making use of twitter lite npm package we would interact with Twitter endpoints STEP Now open ngrok and get a HTTPS URL for the local port and paste the URL in the env file along with the tokens obtained in Section STEP Make a env file to put all the sensitive info form Section API KEY xIrIqvysinxgrSPmIrDcIFAPI SECRET KEY DjIMhoxJlRCxbgtwzXdiGuKEIjmjlAmnvBorusjbzmNofACCESS TOKEN FrdsqhBLgVGDRAPEiyafIbYTvACCESS TOKEN SECRET sRRfIosPcvnwoHTYUIAyhsIkMltauLxspAuMfrENVIRONMENT devROUTE callback urlBEARER TOKEN AAAAAAAAAAAAAAAAAAAAACXWgAAAAAA BbYioHfLTHRMf FnkpApHx B FH DIkLqCmejYNpXoGSbRYoWxPPoJRhyHwgPwjErrSERVER URL P S This makes the heading of the section ironic but anyway move ahead there is lots to cover Have already changed the tokens BTW STEP Make a config js for reading environment variables module exports twitter consumer key process env API KEY consumer secret process env API SECRET KEY access token key process env ACCESS TOKEN access token secret process env ACCESS TOKEN SECRET module exports webhooks serverUrl process env SERVER URL route process env ROUTE consumerKey process env API KEY consumerSecret process env API SECRET KEY accessToken process env ACCESS TOKEN accessTokenSecret process env ACCESS TOKEN SECRET environment process env ENVIRONMENT module exports webhooksUserActivity accessToken process env ACCESS TOKEN accessTokenSecret process env ACCESS TOKEN SECRET Section CodeSTEP In the following code we get the user id of our account and then register a webhook using twitter webhooks package to receive follow and favorite tweet events on our account Paste the following code in bot js require dotenv config const express require express const Twitter require twitter lite const twitterWebhooks require twitter webhooks const twitter webhooks webhooksUserActivity require config const twitterLiteClient new Twitter twitter const app express app use express json app use express urlencoded extended true const userActivityWebhook twitterWebhooks userActivity webhooks app async function get user id const result await twitterLiteClient get users lookup screen name lt twitter id of your app gt const userId result id str get webhooks const webhooksResult await userActivityWebhook getWebhooks if webhooksResult environments webhooks length unregister earlier webhook const webhookId webhooksResult environments webhooks id await userActivityWebhook unregister webhookId Register your webhook url just needed once per URL await userActivityWebhook register Subscribe for a particular user activity userActivityWebhook subscribe webhooksUserActivity userId then function userActivity userActivity on follow data gt console log userActivity id follow on favourite data gt console log userActivity id favourite catch console error app listen process env PORT STEP Now once we have attached the webhooks and started listening for the events let s do some activity on our account using the twitter lite package Here I am greeting the new follower or the user who like a tweet by sending them a DM userActivityWebhook subscribe webhooksUserActivity userId then function userActivity userActivity on follow async data gt const followerName data source screen name const followerId data source id console log n followerName followed you n try await twitterLiteClient post direct messages events new event type message create message create target recipient id followerId message data text Hey followerName Thanks for following You are awesome catch err console error err on favorite async data gt console log JSON stringify data const followerName data user screen name const followerId data user id str console log n followerName liked a tweet n try await twitterLiteClient post direct messages events new event type message create message create target recipient id followerId message data text Hey followerName Thanks for liking the tweet catch err console error err catch console error STEP Run node bot js to run it locally and do follow the bot from your personal account and you would get a DM form the bot P S Sad part is that with a free account only DMs can be sent in a hour window But a plethora of other things can be done with a much larger cap here is the API referenceHigh five on getting it this far Follow part of the tutorial to deploy it on Heroku |
2021-05-31 12:06:03 |
Apple |
AppleInsider - Frontpage News |
Apple releases ECG Apple Watch app in Australia |
https://appleinsider.com/articles/21/05/31/apple-releases-ecg-apple-watch-app-in-australia?utm_medium=rss
|
Apple releases ECG Apple Watch app in AustraliaApple Watch users in Australia are now able to use the ECG feature following regulatory approval from the region s health authorities Apple Watch Series and later now has its ECG feature enabled in AustraliaMore than two years after it was introduced to the States in the Apple Watch Series customers in Australia are now able to use Apple s ECG feature Read more |
2021-05-31 12:20:59 |
Apple |
AppleInsider - Frontpage News |
Lossless Apple Music and no winner in Epic trial - Apple's May 2021 in review |
https://appleinsider.com/articles/21/05/31/lossless-apple-music-and-no-winner-in-epic-trial---apples-may-2021-in-review?utm_medium=rss
|
Lossless Apple Music and no winner in Epic trial Apple x s May in reviewIn May Epic Games versus Apple may have taken some of our attention but we gave most of it to the new Apple Silicon M iMac iPad Pro and Apple TV K ーand on top of all that we got news of Lossless Apple Music The new inch iMac didn t arrive in users hands until the second half of May but it already looks like a hitSometimes a movie will get only a token release in theaters maybe being shown for a week possibly even only for a single day That s when the studio knows it s going to make its money from streaming overseas sales everything except the box office Read more |
2021-05-31 12:17:42 |
Apple |
AppleInsider - Frontpage News |
Intel-based MacBook Pro is Intel's latest anti-Apple campaign target |
https://appleinsider.com/articles/21/05/31/intel-based-macbook-pro-is-latest-anti-apple-intel-campaign-target?utm_medium=rss
|
Intel based MacBook Pro is Intel x s latest anti Apple campaign targetIntel continues to throw shade at Apple oddly aiming at the Intel based MacBook Pro but this time using gaming as a cudgel to try and prove Windows based products are better than Apple s offerings Intel s presentation offered some bold claims against AppleApple is on a two year transition away from Intel in favor of using its own Apple Silicon chips in Macs and its initial M releases easily demonstrates Apple is doing things right However Intel is still quite unhappy about the break up as a presentation to members of the media revealed Read more |
2021-05-31 12:22:02 |
海外TECH |
Engadget |
The best 60-percent keyboards you can buy |
https://www.engadget.com/best-60-percent-keyboards-160038272.html?src=rss_b2c
|
engadget |
2021-05-31 12:00:38 |
医療系 |
医療介護 CBnews |
ワクチン打ち手、臨床検査技師・救急救命士も容認へ-条件付きで、薬剤師らは状況を踏まえ検討 |
https://www.cbnews.jp/news/entry/20210531214618
|
厚生労働省 |
2021-05-31 21:52:00 |
ニュース |
BBC News - Home |
Warning UK could be entering early stages of third wave |
https://www.bbc.co.uk/news/uk-57304515
|
cases |
2021-05-31 12:33:04 |
ニュース |
BBC News - Home |
China allows couples to have three children |
https://www.bbc.co.uk/news/world-asia-china-57303592
|
slowest |
2021-05-31 12:28:38 |
ニュース |
BBC News - Home |
France fugitive caught after shoot-out with Dordogne police |
https://www.bbc.co.uk/news/world-europe-57304907
|
france |
2021-05-31 12:42:06 |
ニュース |
BBC News - Home |
Israel coalition government a threat to security, warns Netanyahu |
https://www.bbc.co.uk/news/world-middle-east-57302814
|
unity |
2021-05-31 12:14:11 |
ニュース |
BBC News - Home |
Swiatek starts French Open defence with birthday win |
https://www.bbc.co.uk/sport/tennis/57306940
|
french |
2021-05-31 12:34:43 |
北海道 |
北海道新聞 |
小樽のコロナ感染者、5月319人 市中感染が全体の7割超 |
https://www.hokkaido-np.co.jp/article/550124/
|
新型コロナウイルス |
2021-05-31 21:10:12 |
北海道 |
北海道新聞 |
フジの甘い香りに誘われて 函館・五稜郭公園で見頃 |
https://www.hokkaido-np.co.jp/article/550149/
|
新型コロナウイルス |
2021-05-31 21:05:27 |
北海道 |
北海道新聞 |
清原さん長男、神宮でベンチ入り 慶大、東京六大学新人戦 |
https://www.hokkaido-np.co.jp/article/550148/
|
東京六大学 |
2021-05-31 21:04:00 |
北海道 |
北海道新聞 |
五輪選手村に酒持ち込み可 政府説明、野党批判相次ぐ |
https://www.hokkaido-np.co.jp/article/550147/
|
持ち込み |
2021-05-31 21:04:00 |
仮想通貨 |
BITPRESS(ビットプレス) |
[CoinDesk Japan] バイデン大統領が予算案を発表、暗号資産に新たな報告義務も-規制強化の一端か |
https://bitpress.jp/count2/3_9_12534
|
coindeskjapan |
2021-05-31 21:44:53 |
仮想通貨 |
BITPRESS(ビットプレス) |
[FT] 仮想通貨、米当局が規制強化の方途を検討 |
https://bitpress.jp/count2/3_9_12533
|
規制強化 |
2021-05-31 21:25:33 |
仮想通貨 |
BITPRESS(ビットプレス) |
ビットポイントジャパン、6/30まで「 TRX(トロン)がもらえる!~口座開設&入金キャンペーン」実施 |
https://bitpress.jp/count2/3_14_12468
|
開設 |
2021-05-31 21:13:49 |
仮想通貨 |
BITPRESS(ビットプレス) |
コインチェック、国内初となる 「IEO(Initial Exchange Offering)」 を今夏実施予定 |
https://bitpress.jp/count2/3_11_12532
|
実施予定 |
2021-05-31 21:03:09 |
コメント
コメントを投稿