投稿時間:2021-12-08 00:42:54 RSSフィード2021-12-08 00:00 分まとめ(51件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT 気になる、記になる… Appleの整備済み商品情報 2021/12/7 https://taisy0.com/2021/12/07/149499.html apple 2021-12-07 14:35:01
AWS lambdaタグが付けられた新着投稿 - Qiita TerraformでやってきたLambdaデプロイの試行錯誤の歴史と行き着いた雑な運用 https://qiita.com/NaotoFushimi/items/b0131ac2b2a7252f73ad ProsSのobject更新とコード更新の分離が簡単得意なものがあるツールに縦割りで任せられるConsインフラリポジトリ側で宣言したものとの受け渡しが大変ツールが分散する検討したこと「アプリビジネスロジックよりのコンポーネントってstatefulなAWSComponentとわけておきたいよね」みたいな肌感が最初からあると、これは有効かもしれません。 2021-12-07 23:44:59
python Pythonタグが付けられた新着投稿 - Qiita 【5日目】Python初心者が分岐処理・ループ処理・リストの基本を学ぶ https://qiita.com/rin5xpbpm/items/22150746648327797e00 今回は逆順でループするように指定しました。 2021-12-07 23:47:23
python Pythonタグが付けられた新着投稿 - Qiita Pythonで学び直す数学【集合・確率編】~例題を解きながら集合とリストの使い方を理解しよう https://qiita.com/mikako0115/items/1963feee0650305ff21a Pythonでは「」を使って部分集合かどうかを確認することができます。 2021-12-07 23:23:37
python Pythonタグが付けられた新着投稿 - Qiita なんでもヴェイパーウェイヴにする https://qiita.com/o________o/items/0bcb7a3695e2610ce6f6 なんでもヴェイパーウェイヴにするヴェイパーウェイヴとは音楽的には、年代から年代にかけての大衆音楽、ラウンジ・ミュージック、スムースジャズ、コンテンポラリー・RampBなどのサンプリングを基本とし、そこからループ、ピッチダウン、チョップドampスクリュード英語版などエフェクトを重ねていくことによって制作されるヴェイパーウェイヴ出典フリー百科事典『ウィキペディアWikipedia』元ネタ音源ヴェイパーウェイヴにするとりあえず遅くしてピッチダウンしてみるこれ使うと遅くなるらしいOrhalftheoriginalspeedyslowlibrosaeffectstimestretchyimportlibrosaimportsoundfileassfimportpydubfrompydubimportAudioSegmentpathhomedevtmpmpvwmppathslowhomedevtmpmpsmwavysrlibrosaloadpathmonoTrueyslowlibrosaeffectstimestretchysfwritepathslowyslowformatwavsubtypePCMおしまい聞いてみたなぜかピッチ上がってる。 2021-12-07 23:06:58
js JavaScriptタグが付けられた新着投稿 - Qiita Jestでテスト用の環境変数を設定する https://qiita.com/manten120/items/b55d88e16e93b393ba04 2021-12-07 23:26:02
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) SwitUIで@EnvironmentObjectを利用する際、Struct内で使えません https://teratail.com/questions/372769?rss=all SwitUIでEnvironmentObjectを利用する際、Struct内で使えません前提・実現したいことSwiftUIを使ったアプリを制作しております。 2021-12-07 23:55:56
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Dockerコンテナ起動時に複数のpythonファイルを実行したい https://teratail.com/questions/372768?rss=all Dockerコンテナ起動時に複数のpythonファイルを実行したい目的・dockerコンテナ作成時につのpythonのファイルを実行したいのですが、検索しても上手くいく方法がありませんでした。 2021-12-07 23:44:13
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) nav _openが消えない https://teratail.com/questions/372767?rss=all navopenが消えない前提・実現したいこと表題の通り、navopenのopenが消えないhumbergerとoverlayをクリックしたときに、消したいです。 2021-12-07 23:44:12
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) エラーコードが出るがそれの原因がわからない https://teratail.com/questions/372766?rss=all 2021-12-07 23:40:59
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) googleフォームの回答をスプレッドシートに反映させ、googleカレンダーに自動反映させたい https://teratail.com/questions/372765?rss=all googleフォームの回答をスプレッドシートに反映させ、googleカレンダーに自動反映させたい前提・実現したいことgoogleフォームスプレッドシートgoogleカレンダーgoogleサイトにて社外向けのZoomミーティング仮予約予定表を作成したい。 2021-12-07 23:40:32
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) crystal reports for eclipse 定義が変更時のRpt更新方法 https://teratail.com/questions/372764?rss=all crystalreportsforeclipse定義が変更時のRpt更新方法一旦rptファイル作成した後でDataSetに対して列の追加を行いたいです。 2021-12-07 23:33:13
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Vue.jsで処理を遅らせたい。 https://teratail.com/questions/372763?rss=all Vuejsで処理を遅らせたい。 2021-12-07 23:31:34
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 極座標の軸を20度ごとではなく30度ごとに表示させたい https://teratail.com/questions/372762?rss=all 極座標の軸を度ごとではなく度ごとに表示させたいこのプログラムを実行するとthetaの軸が・・・となっていますが、・・・というふうに表示させたいです。 2021-12-07 23:30:45
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) センサー反応後にモーターを停止、数秒後にセンサーを一旦切ってモーターを再稼働させたいです https://teratail.com/questions/372761?rss=all 前回のプログラムの内容を簡単に説明すると、センサーに反応がない場合はモーターを稼働、反応があった場合はモーターを停止、反応が無くなった場合はモーターを再稼働させるといったものです。 2021-12-07 23:30:12
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) gitのブランチ作成 https://teratail.com/questions/372760?rss=all gitのブランチ作成初歩的な質問で申し訳ないのですが、全く新しいディレクトリを作ってgitnbspcloneをすると、最初mainブランチというブランチができますが、addやコミットなど一切できません。 2021-12-07 23:26:19
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) PythonでDataFrameにStrを追加(挿入)し、CSVに出力したい https://teratail.com/questions/372759?rss=all PythonでDataFrameにStrを追加挿入し、CSVに出力したい前提・実現したいことPythonでDataFrameにStrを追加したい。 2021-12-07 23:25:59
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) エラーの理由と解決方法を知りたいです。 https://teratail.com/questions/372758?rss=all エラーの理由と解決方法を知りたいです。 2021-12-07 23:16:30
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 複数の異なるマーカーでそれぞれ別のオブジェクトを表示したい。 https://teratail.com/questions/372757?rss=all 複数の異なるマーカーでそれぞれ別のオブジェクトを表示したい。 2021-12-07 23:09:45
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) access vba でのSQL文について https://teratail.com/questions/372756?rss=all accessvbaでのSQL文について前提・実現したいこと現在accessnbspvbaでsql文の勉強を教科書に沿って行っております。 2021-12-07 23:09:13
Ruby Rubyタグが付けられた新着投稿 - Qiita 【Rails】RSpec、Capybara、FactoryBotの使い方 https://qiita.com/mmaumtjgj/items/0798eb4c3ce062bd505f rmrtestCapybaraCapybaraはrailsnewの時にbundleinstallによりすでにインストールされているので、RspecでCapybaraを利用するための準備を行う。 2021-12-07 23:22:23
AWS AWSタグが付けられた新着投稿 - Qiita AWS re:Invent アップデートまとめ (VMware Cloud on AWS 編) https://qiita.com/sanjushi/items/2696271334893b12a494 本文は英語ですがこちらVMware社の公式ブログにもVMwareCloudonAWSについて年月時点の最新アップデートがまとまっています。 2021-12-07 23:57:55
AWS AWSタグが付けられた新着投稿 - Qiita TerraformでやってきたLambdaデプロイの試行錯誤の歴史と行き着いた雑な運用 https://qiita.com/NaotoFushimi/items/b0131ac2b2a7252f73ad ProsSのobject更新とコード更新の分離が簡単得意なものがあるツールに縦割りで任せられるConsインフラリポジトリ側で宣言したものとの受け渡しが大変ツールが分散する検討したこと「アプリビジネスロジックよりのコンポーネントってstatefulなAWSComponentとわけておきたいよね」みたいな肌感が最初からあると、これは有効かもしれません。 2021-12-07 23:44:59
AWS AWSタグが付けられた新着投稿 - Qiita Amazon RDS Custom for Oracle作成の手引き(その2:事前準備) https://qiita.com/asahide/items/a93a9836e754b58997cc CEVCustomEngineVersionの作成KMSキーの準備IAMロールの作成セキュリティグループの作成エンドポイントの設定CEV作成手引きはこちらに記載してますので、参考にしてください。 2021-12-07 23:26:10
golang Goタグが付けられた新着投稿 - Qiita Goを使用するにあたり、ポインタとアドレスでつまづいたので覚書 https://qiita.com/RikiLog/items/5d9322e5fb005c8477fd アドレスに値があれば、アドレスから値を参照することができる例では、bにはaのアドレスを代入したが、その前にaには値が定義されているので、bからaにセットされている値を参照することができる。 2021-12-07 23:48:38
golang Goタグが付けられた新着投稿 - Qiita beegoでOauthログイン機能サーバー開発 https://qiita.com/yufuku/items/b2b2b4d2eb46dba0476c ログインログイン機能はリクエストされたユーザー名とパスワードをデーターベースに登録されたものと同じであれば、アクセストークンとリフレッシュトークン再作成してレスポンスとして返す機能です。 2021-12-07 23:32:49
Ruby Railsタグが付けられた新着投稿 - Qiita 【Rails】RSpec、Capybara、FactoryBotの使い方 https://qiita.com/mmaumtjgj/items/0798eb4c3ce062bd505f rmrtestCapybaraCapybaraはrailsnewの時にbundleinstallによりすでにインストールされているので、RspecでCapybaraを利用するための準備を行う。 2021-12-07 23:22:23
技術ブログ Developers.IO Athenaでデータソースにクエリをする際にハマったこと https://dev.classmethod.jp/articles/things-i-was-addicted-to-when-querying-data-sources-in-athena/ amazon 2021-12-07 14:53:38
技術ブログ Developers.IO [レポート] AWS Private 5Gについて今わかっていること #reInvent #cmregrowth https://dev.classmethod.jp/articles/cm-regrowth-2021-aws-private-5g/ awsprivateg 2021-12-07 14:46:22
海外TECH Ars Technica Concerned about SpaceX, France to accelerate reusable rocket plans https://arstechnica.com/?p=1818450 concerned 2021-12-07 14:04:14
海外TECH MakeUseOf Samsung Smartphone Holiday Bundle: Free Pair Buds2 With S20, Z Fold3, and Z Flip3 https://www.makeuseof.com/samsung-smartphone-holiday-deals/ audio 2021-12-07 14:56:11
海外TECH MakeUseOf The 7 Best Apps to Get Your Projects Done Faster https://www.makeuseof.com/best-apps-to-get-projects-done-faster/ complete 2021-12-07 14:45:12
海外TECH MakeUseOf How to Download and Install OpenVR Advanced Settings https://www.makeuseof.com/download-install-openvr-advanced-settings/ settings 2021-12-07 14:30:11
海外TECH MakeUseOf Microsoft Now Lets You Know How a Game Will Play on Your PC https://www.makeuseof.com/xbox-app-performance-check/ windows 2021-12-07 14:24:01
海外TECH MakeUseOf How to Create a Portfolio Website From Scratch https://www.makeuseof.com/create-portfolio-website/ create 2021-12-07 14:15:41
海外TECH DEV Community How to use Ngrok for tunnelling the local servers? https://dev.to/rohan2596/how-to-use-ngrok-for-tunnelling-the-local-servers-58n4 How to use Ngrok for tunnelling the local servers NgrokHello Its Rohan KadamDeveloping an application and testing it s at the same time is part of any software We might need to expose our local server for testing our application We wish to show our work to a colleague or client or we need a secure publicly available callback URL to interact with a web service We could go ahead and upload your app to a hosting platform like AWS or Google Cloud but then every time we make an update we have to push those changes to our host server…not great To overcome this problem we could concept called tunnelling What is Tunnelling Tunnelling is used to create a network link between two computers in conditions of restricted network connectivity including firewalls NATs and ACLs among other restrictions The tunnel is created by an intermediary called a proxy server which is usually located in a DMZ In order to achieve we used Ngrok Tunnelling What is Ngrok Ngrok exposes local servers behind NATs and firewalls to the public internet over secure tunnels How does It work Download ngrok Download and run a program on your machine and provide it with the port of a network service usually a web server Connect your service Connect to ngrok cloud service which accepts traffic on a public address Access from anywhere Traffic is relayed through to the ngrok process running on your machine and then on to the local address you specified What it s Good For Run personal cloud services from your home Demo websites without deploying Build webhook consumers on your dev machine Test mobile apps connected to your locally running backend Stable addresses for your connected devices that are deployed in the field Step On Running Exe file below screen will be visible Step Exposing or Tunnelling port Step On Successful Tunnelling able to see the below screen Note Above is a free version which is valid for two hours and COMMANDS authtoken save auth token to the configuration filehttp start an HTTP tunnelstart start tunnels by name from the configuration filetcp start a TCP tunneltls start a TLS tunnelupdate update ngrok to the latest versionversion print the version stringhelp Shows a list of commands or helps for one commandngrok is a command line application try typing ngrok exe http at this terminal prompt to expose port Conclusion In the article we tried to answers many questions related to Tunneling and especially Ngrok Tunnelling how it helps developers around the world to test the application on the real servers without deploying cloud code and built faster applications Please do share and likeif you find the article useful Follow me on medium Rohan Ravindra Kadam and on Twitter at rohankadam Bibliography Ngrok Documentationngrok secure introspectable tunnels to localhost 2021-12-07 14:50:57
海外TECH DEV Community How to overcome Imposter Syndrome in Tech https://dev.to/codesphere/how-to-overcome-imposter-syndrome-in-tech-4e1o How to overcome Imposter Syndrome in TechHave you ever wondered why someone thinks so highly of you Have you questioned why they ve given you such a cool and important project to own at work The majority of us have probably experienced Imposter Syndrome during some stage of our lives No matter if you re just starting out in your career if you re a perfectionist or a high performer with many years experience millions of people suffer with imposter syndrome So what is imposter syndrome exactly A belief that you are not intelligent creative or generally deserving of the success you are experiencing even though there is plenty of evidence of your achievements People who experience imposter syndrome are basically experiencing the feeling of being a fraud who is undeserving which brings feelings of anxiety and stress as you feel like you re misleading your colleagues and employees Imposter syndrome is prevalent within the tech industry with about of tech employees stating that they currently experience some form of the condition within their careers It s especially common in software engineers developers and designers It s usually worse in people who are new within the tech industry are part of an underrepresented group or have come from different professional backgrounds Some of these thoughts are normal to have while experiencing imposter syndrome “What am I doing here I m not a developer I am fooling myself and other people “My team is much smarter than I am I don t deserve to be here “When people realise I m not as intelligent as I make out I ll be fired The thought processes above make people believe that they are not worthy enough that their achievements aren t good enough and that they re fooling people into thinking they re someone that they re not You will most likely become very worried about your position and performance which can lead to high amounts of stress and even burnout from working too much seemingly to catch up with your peers perpetuating the notion that you need to work twice as hard to keep up just to prove your worthiness The result of imposter syndrome is a working life dominated by anxiety exhaustion uncertainty confusion and fear The vicious cycleThe tech industry is rife with imposter syndrome the majority of designers and programmers suffer with it at one or several points in their career You may assume that success will eradicate the syndrome and finally make you feel more worthy however the more successful someone becomes the more likely it is that they will feel like they re fooling everyone Rather than enjoying that success and recognising that their success came from themselves and not because someone higher up made a mistake about you One of the biggest problems with this syndrome is that a lot of people get stuck in a cycle Believing that you re not good enough leads to perfectionism meaning that even the most menial tasks will take you much longer to complete as you become obsessed that everything has to be perfect before submission People who suffer with Imposter Syndrome may also find that they will over prepare for projects and meetings you may find that you begin suffering with stage fright not being able to present your work any more as you put too much pressure on yourself to perform perfectly even on the spot How to begin to overcome Imposter SyndromeEven though the effects of Imposter Syndrome are clearly bad for mental health confidence and sense of self once you start to recognise the symptoms we ve discussed above there are ways you can begin to overcome it and regain your self belief The three steps that will help Find a mentorRemember your past experiences and trainingKeep track of your accomplishments Let s take a look at these in a little more detail MentorsFinding a mentor within your professional environment will give you an outside perspective on what people really think of you and your work You ll find yourself feeling less alone in your negative self view as you have someone specifically to talk through how you are feeling As well as getting an outside perspective and building your confidence a mentor will also be able to identify knowledge gaps that you might have and suggest training and learnings that you should work on to keep you constantly improving Past experiencesReflecting on your past experiences and remembering the training you ve been through will give you a much better perspective on how far you ve come Remembering how inexperienced you were at the beginning of your journey compared to how much experience you ve gained now should give you a sense of achievement not fear Knowing that you still have a lot to learn is a great thing but don t forget how much you ve already learned and be proud of that fact You don t need to be an expert in your field before you experience success Your accomplishmentsOne piece of advice I ve received that has worked wonders is to keep track of your accomplishments Keep a document where you add praise you receive for the work you ve done When you re not feeling worthy enough or your confidence has taken a hit you can open that document and remind yourself of all the great stuff you ve achieved and how much people have appreciated your hard work To wrap upRemember sometimes you can have a bad day sometimes you will struggle to figure out a problem and sometimes it will take you a little longer to figure out a solution to a project you re working on Once you recognise you re suffering from Imposter Syndrome take some of the advice we ve spoken about here and put it into action Constantly remind yourself of your achievements and always listen to people s positive opinions of you and your work We re all human beings and nobody should expect perfection from you all the time not even you Have you experienced imposter syndrome in your career What are your top tips for other coders Let us know in the comments below Happy coding from your good friends at Codesphere the next generation cloud provider 2021-12-07 14:41:15
海外TECH DEV Community Getting back into web-development. https://dev.to/shinzokun/getting-back-into-web-development-21bp Getting back into web development At the almost end of the last year I had taken up a ritual a religious virtue on my hands To learn to code to learn to build not just websites but build value And to some extent that s what I solely did Learned to provide value through code through menial lines of words displayed on a screen that didn t make sense to most people but somehow it conveyed value somehow it made me happy Somehow it quite brightened my life But that didn t last long more than I expected at the peak of October this year I started getting frustrated frustrated with coding not coding but the reason that I had at the start of my journey was morphed into something I didn t want Annoyed that I almost religiously started to hate building websites I was angry at myself For getting bored watching Tutorials after tutorials I was basically stuck in a tutorial hell and didn t seem to find any reasons why I would want to continue on this path I was bored of making websites too changing the font style changing the header tag And god knows what I had lost my reason The reason that got me into it in the first place The reason that had helped me endure the terrible cycles of learning and practice The reason that actually made me get excited about learning to code And actually to code I had lost it somewhere somewhere in the journey From the superfluous innovation I dreamt of at the start of my journey to the money I was chasing by the end I wasn t excited I wasn t enjoying the “stucks the coding provided me just simply I was not sure about the path ahead So I dumped it And went to look for a path A different path that would excite me for the time being Tried I won t say a lot but a few things Things with careful consideration From Day Trade To Possibly enrolling for Psychology But in the end nothing worked At least not the way I thought it would I was still chasing money it s not that I don t deem the importance of it but I find it exhilarating to chase something that I don t find exciting Only to end up here again The dream I had at the beginning of my adolescence To innovate to create and to at least change the world with value with value that I can provide that my abilities and capabilities can provide I knew I wanted to innovate but also knew I had to get above money Just enough to pass by to strive So that s what I chose This time My top priority is to innovate and secondary to strive But before any of that jazz I got to learn learn everything again from scratch till the moderate intermediate I was So here s my journey From now on getting into development again And possibly for the last time My goal this time is to expand as much as possible but also specialize in a few areas to keep myself sane To at least get “ching ching money So I ll be starting as the most start By going through The basic standards of the web Html CSS And JS And then probably will move to “React Native this time as I am quite excited to explore the awakenings of mobile development And possibly Flutter too Though my end goal as of right now in the hierarchy is to learn and understand more about “Blockchain And CryptoCurrency Tech But yes I ll probably be dwelling into a lot of spaces before I either find one which is unlikely or just explore possibly everything which is also unlikely yes The only thing I would say I need this time Is LUCK So Best Of Luck 2021-12-07 14:41:01
海外TECH DEV Community Use this Tailwind CSS Cheat Sheet to speed up your development process https://dev.to/zolidev/use-this-tailwind-css-cheat-sheet-to-speed-up-your-development-process-2l6p Use this Tailwind CSS Cheat Sheet to speed up your development processI ve been working on the past few days on a cheat sheet tool for Tailwind CSS that you can use to search for the utility classes from the framework from a single page Although I would still recommend using the official documentation when working with Tailwind CSS having a searchable single page where you can quickly find the utility classes can speed up your development process even more This cheat sheet tool includes all of the utility classes from the latest stable version of Tailwind CSS and as soon as v becomes stable I ll update the contents to include the JIT features as well Check it out here 2021-12-07 14:32:36
海外TECH DEV Community How To Set Up a GitHub Action to Update the README File in All Your GitHub Repositories https://dev.to/geraldiner/how-to-set-up-a-github-action-to-update-the-readme-file-in-all-your-github-repositories-4epj How To Set Up a GitHub Action to Update the README File in All Your GitHub RepositoriesSubmission Info My WorkflowA workflow for updating the README file in all your repositories This is especially helpful if you use a template and want to update a specific section with new information e g an Other Projects section that needs to be updated with more recent projects Submission CategoryWacky Wildcards Yaml File or Link to Code geraldiner projects readme tutorial Additional Resources InfoSee below for a full tutorial README Files in Brief and How to Set One Up Why You Should Have a README File in Your GitHub RepositoriesAs you continue to build out your portfolio with projects on GitHub it s a good idea to include a README at the root of each project to describe what the project is about and how it was built This is useful for anyone who comes across your projectーother developers recruiters or even your future selfーto get a quick understanding of the project and your process Personally it is also a great reflection tool since I usually write them after a project has been completed How to Write a README File for Your ProjectBut of course you don t always have to do this from scratch Resources such as GitHub README Templates allows you to view README layouts for different sites which can give you an idea of how to format your own README A simple Google search for github readme template will also bring up a number of templates in repositories that you can just fork for yourself As the title of this post suggests a full breakdown of a README for your project is beyond the scope of this post To help you get started I recommend reading Tracy Nuwagaba s article How to write a readme for your GitHub project If you re like me you can pick your favorite template and tweak it to fit your needs Bonus Tip Load the template as a snippet in VS CodeIf you use VS Code as your main code text editor you can save your own snippets to reuse chunks of code in different places Follow these directions to save the template as a custom snippet in VS Code You can also use this snippet generator to easily format the code snippet Problem Updating Older README Files with Newer ContentAs previously mentioned I use the same README template for my projects which includes a section for Other Projects and links to the repos of my other projects This is a not so secret technique to keep the user clicking through my GitHub portfolio Naturally in my older projects there were links to even older projects As I continue learning I ve built more projects and want to make sure the most recent and polished projects are always on display But who wants to go through the other repositories to update EVERY SINGLE README FILE Definitely not me Using the tried and true method of Googling to see if anyone else has encountered this issue I came across Eugene Yan s article How to Update a GitHub Profile README Automatically He also cites Simon Willison who achieved a similar task of building a self updating profile README for GitHub Both of these were done with GitHub Actions which I d never heard of until then And while this sounds like a really neat integration for the GitHub Profile README it wasn t quite what I needed But I thought maybe I could still use GitHub Actions to solve my problem Solution GitHub Actions to Run a Script that Interacts with the GitHub APIIn short GitHub Actions are automated workflows that run based on triggers to perform a set of jobs For JavaScript folks it s like addEventListener for GitHub From pushes to pull requests to issues a GitHub Action can be attached to those events which will trigger the action and the job s will run Again I d never heard of GitHub Actions before so I had to spend a lot of time reading the documentation and other people s code It turned out to be simpler than I thought especially since I figured out you could write a script that you set up the action to run Step by Step Instructions to Setting Up the GitHub ActionGitHub Actions uses YAML which this tutorial doesn t require you to know a lot of Personally I relied on the documentation and Eugene and Simon s code for this part But the main script is written in JavaScript and uses Node js so some knowledge of both is needed Step Set up your project in your local environmentFirst set up your project on your computer or other work environment If you re not particularly tied to one editor or don t have a local environment you can still code in the browser Check out my article on browser based code editors Three Levels of Code Editors in the Browser For this tutorial I have a directory called projects readme tutorial and I ll be using VS Code as my code editor Step Initiate a Node js project with npm init and install dependenciesNext you have to initiate a Node js project and install dependencies via a Terminal or Command Prompt In VS Code you can open the terminal by going to Terminal gt New Terminal You can use npm init which will take you through a series of questions to initiate your project or use npm init y to use all the default configuration settings Here I used npm init y and a package json file was created in the directory Now you can install some dependencies for this project For this project you ll need the following dependencies octokit core For accessing the GitHub APIdotenv For loading environment variables such as a GitHub Personal Access Token and keeping them secret when you push to the repositorynodemon optional For automatically restarting the node application when files are changed I like to use this for quick and easy testing debugging so I don t have to stop and start the server every time I change a file Run the following line in your terminal to install the dependencies npm i octokit core dotenv nodemonYour package json file should be updated with the dependencies you just installed We ll come back to this in a bit to update the scripts We ll also be using fs for file system access but that s already integrated with Node js Step Set up the file that holds the text to update all the README filesNow you ll create the file that holds the text that will replace all the old text in the README files This is the dynamic content such as my Other Projects section of my README template When creating this file make sure there is some part that is easily distinguishable from the rest This is so that in the main script you can easily look for where the new content should be placed You could add comments such as lt start dynamic content here gt but I chose to go by the heading instead There is no other Other Projects heading in the file I ve created a new file named projects md and pasted in the content that will replace the old content in the README files The projects md file on the left is just the Other Projects section from my README template file on the right Step Write a script to access the GitHub API and update the README file in all reposNow comes the meat and potatoes of the project This is the script that will do all the work in finding the README file in all your repositories updating the README file with the content from the projects md file and pushing the new file and its changes to the repository If you re looking to do something else with this project be sure to read the GitHub API documentation For anything interesting we need a Personal Access Token when making requests to the GitHub API Follow these instructions to get your own Personal Access Token Once you ve got the Personal Access Token save it in a env file in the root of your project folder Now create a file named index js We ll need the fs dotenv and octokit packages Now we have to set up the octokit client with our Personal Access Token to access our repos and files For more information about setting up octokit take a look at their documentation The rest of the file is made up of asynchronous functions that willFind all your reposAccess the current README file or create one if it doesn t exist Commit the updated new README fileFind All Your ReposThis part of the script uses the List repositories for a user endpoint of the GitHub API On line note that if you have more than repositories you ll have to modify the code a bit to cover all your repositories since the max per page is On line I take the extra step of filtering out certain repos that I don t want to be updated including the README file for my GitHub profile and the project itself Then on lines a simple for loop goes through each repo to find and access the README file Access the Current README fileThis part of the script uses the Get repository content endpoint of the GitHub API There are two other endpoints for specifically getting the README file of a directory but for some reason I couldn t get those to work This one was the only one that would successfully retrieve the file if it existed On line is where the actual request is being made The data looks something like this But what we re most interested in are the following path the file namesha the id for the latest commitcontent the actual content of the README file in baseencoding the encoding for the file contentSo on line there is some destructuring to isolate those pieces of information The lines that follow are for converting the file contents from base to a String Then it finds the index for the Other Projects section heading remember when I said to make it something easily distinguishable With this index we can use slice to only take the first part of the content and concatenate the new content from the projects md file There is a helper function to easily get the new content using the fs package If the README file doesn t exist it will just create a new one with the content from projects md Commit the updated new README fileFinally the updated new README file will be committed to their respective repos This is where the sha in the previous code segment comes in handy so that it can replace the newest commit This part of the script uses the Create or update file contents endpoint of the GitHub API Using information generated in the previous code segment it will make a PUT request The final scriptThe final script should look like the code below Remember that we ve only defined functions right now We need to actually call the main function updateAllRepos so all that work will actually run Running Testing the scriptNow that we ve got the script set up you can test it yourself by running index js with node or nodemon if it was installed Back in the package json file add the following to the scripts section Step Set up the GitHub Action in a YAML fileNow that we ve got the main script set up we can work on setting up the actual GitHub Action GitHub Actions are workflows made of event s that trigger job s For this GitHub Action we ultimately want to run the script we just created whenever the projects md file is updated and pushed to the repository In the root of your project directory create a folder called github and in that folder create another folder called workflows In the workflows folder create a file called action yaml This action can be broken down to the following The event will be a push to the repository specifically for the projects md fileThe main job is to run the index js script which is further broken down to the following steps Check out the repoSet up a Node js environmentInstall the dependenciesRun the scriptIn the action yaml file this translates to the following You ll notice on lines that we re setting an environment variable called GH TOKEN like we did in the env file In order for the script to have access to the GH TOKEN while being run by the action you need to set a repository secret Follow these instructions to set a secret for your repository You can set any number of environment variables and secrets and access them the same way Step Set up a GitHub repository for where the GitHub Action should liveNow that we ve got all our files set up we can push all our code to GitHub and get the GitHub Action up and running First set up a GitHub repository to house this project and the GitHub Action Then follow the instructions for or push an existing repository from the command line to connect to your local work environment Don t forget to set up a gitignore file to ignore the node modules folder and env file that contains your Personal Access Token If everything worked out smoothly you should see your code in the repository If you go to the Actions tab you might not see anything yet since it s the initial commit However once you make some changes to projects md and push the changes to the repository it should run the action And once the action is completed you should see your README files updated like so Wrapping UpAnd that s it Now you have a single file that can be used to update a bajillion other files I hope you learned as much as I did about GitHub Actions It makes me curious about a whole bunch of other automations I could create like the one that autogenerates the GitHub Profile README If you have any questions or need some help please feel free to reach out Happy coding Thanks for reading Geraldine Say hi on Twitter geraldinedesuThis post was put together as if rearranging furniture I had to move around the different pieces to make sure the step by step instructions were logical and easy to follow Source Giphy 2021-12-07 14:06:03
Apple AppleInsider - Frontpage News Best deals Dec. 7: Refurb iPhones, $106 off Klipsch speakers, $620 Mavic Air 2, more! https://appleinsider.com/articles/21/12/07/best-deals-dec-7-refurb-iphones-106-off-klipsch-speakers-620-mavic-air-2-more?utm_medium=rss Best deals Dec Refurb iPhones off Klipsch speakers Mavic Air more Alongside discounts on a wide array of refurbished iPhones Tuesday s best deals include off Klipsch Bookshelf speakers a Tile tracker four pack for and buy two get one free on select toys and games from Amazon and Target Best deals for December The internet has a plethora of deals each day but many deals aren t worth pursuing In an effort to help you sift through the chaos we ve hand curated some of the best deals we could find on Apple products tech accessories and other items for the AppleInsider audience Read more 2021-12-07 14:54:03
Apple AppleInsider - Frontpage News Morgan Stanley hikes Apple price target to $200 on 'Apple Car' and AR https://appleinsider.com/articles/21/12/07/morgan-stanley-hikes-apple-price-target-to-200-on-apple-car-and-ar?utm_medium=rss Morgan Stanley hikes Apple price target to on x Apple Car x and ARInvestment bank Morgan Stanley has raised its Apple price target to driven by what is expected from the company relatively soon as well as short term drivers like the App Store and iPhone supply Credit Laurenz Heymann UnsplashIn a note to investors seen by AppleInsider lead analyst Katy Huberty said that the bank is cautious on IT hardware heading into but noted that Apple should benefit from a light to quality driven by new products being priced in as well as the iPhone and App Store Read more 2021-12-07 14:52:46
Apple AppleInsider - Frontpage News Apple made secret 5-year $275B deal with Chinese government https://appleinsider.com/articles/21/12/07/apple-made-secret-5-year-275b-deal-with-chinese-government?utm_medium=rss Apple made secret year B deal with Chinese governmentApple s success in China is allegedly down to an agreement with the country s government to help develop its economy with a report claiming CEO Tim Cook personally lobbied officials to get the best deal for the company Tim Cook speaking to China Vice Premier Sun Chunlan in March Apple considers China to be a major market with the iPhone maker expending considerable effort to make headway both in generating custom and in its extensive supply chain operations The success in China has been a turnaround years in the making and it seems that a secret agreement may have greased the wheels Read more 2021-12-07 14:52:25
海外TECH Network World Gartner: Key infrastructure and operations trends to dominate 2022 https://www.networkworld.com/article/3643580/gartner-key-infrastructure-and-operations-trends-to-dominate-2022.html#tk.rss_all Gartner Key infrastructure and operations trends to dominate The impact of COVID on the workforce is making the IT world more challenging for infrastructure and operations I amp O leaders but it s also a chance for those leaders to drive some serious business changes and increase resiliency according to analysts presenting at this week s virtual Gartner IT Infrastructure Operations amp Cloud Strategies Conference “I amp O leaders need to drive change not simply absorb it said Jeffrey Hewitt research vice president at Gartner to the virtual audience I amp O leaders are expected to deliver more adaptable and resilient service from anywhere ーand for an increasingly distributed workforce Hewitt said To read this article in full please click here 2021-12-07 14:12:00
海外科学 NYT > Science What We Know About the New Covid Variant, Omicron https://www.nytimes.com/article/omicron-coronavirus-variant.html What We Know About the New Covid Variant OmicronIntense research into Omicron first identified in southern Africa has just begun World leaders and public health experts have urged people not to panic ーand to get vaccinated if they can 2021-12-07 14:55:05
ニュース BBC News - Home Omicron: Wales expects significant wave of new Covid variant https://www.bbc.co.uk/news/uk-wales-59565670?at_medium=RSS&at_campaign=KARANGA health 2021-12-07 14:51:00
ニュース BBC News - Home Storm Barra: Weather warnings for most of UK as gales and rain hit https://www.bbc.co.uk/news/uk-59563935?at_medium=RSS&at_campaign=KARANGA warning 2021-12-07 14:16:27
ニュース BBC News - Home Sam and Chris Gould: Failures made after twins reported sex abuse https://www.bbc.co.uk/news/uk-england-cambridgeshire-59507422?at_medium=RSS&at_campaign=KARANGA girls 2021-12-07 14:56:31
ニュース BBC News - Home Instagram announces changes ahead of political grilling https://www.bbc.co.uk/news/technology-59565631?at_medium=RSS&at_campaign=KARANGA senate 2021-12-07 14:11:10
サブカルネタ ラーブロ らうめん とくや(新御茶ノ水)/しお 玉子入り+とくやのめし http://ra-blog.net/modules/rssc/single_feed.php?fid=194378 新御茶ノ水 2021-12-07 14:13:04
北海道 北海道新聞 張本智和、世界王者に敗れて準V 卓球のカップファイナル https://www.hokkaido-np.co.jp/article/620257/ 世界王者 2021-12-07 23:06:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)