投稿時間:2023-08-20 01:05:29 RSSフィード2023-08-20 01:00 分まとめ(7件)
カテゴリー等 | サイト名等 | 記事タイトル・トレンドワード等 | リンクURL | 頻出ワード・要約等/検索ボリューム | 登録日 |
---|---|---|---|---|---|
Linux | CentOSタグが付けられた新着投稿 - Qiita | 【Linux】うるう秒対策 | https://qiita.com/dan-go/items/6f606b4b3f7090b013bd | centosetcchronyconf | 2023-08-20 00:22:56 |
Azure | Azureタグが付けられた新着投稿 - Qiita | Terraform のライセンス変更についての考察 | https://qiita.com/fsd-sayhorn/items/fcda6e180ebf9bd090de | terraform | 2023-08-20 00:56:26 |
海外TECH | MakeUseOf | How to Fix the WinX Menu Not Working on Windows | https://www.makeuseof.com/winx-menu-not-working-windows/ | handy | 2023-08-19 15:16:23 |
海外TECH | DEV Community | Get Notified in Slack for Every New User Sign Up With Authgear | https://dev.to/bobur/get-notified-in-slack-for-every-new-user-sign-up-with-authgear-4n99 | Get Notified in Slack for Every New User Sign Up With AuthgearUser sign ups are a crucial aspect of most web applications and keeping track of them can provide valuable insights Getting notified when a new user signs up is not just about knowing the numbers but also about immediate user engagement For example you can send a welcome message or introduce them to special sign up bonuses or offers as soon as they get authenticated in your system When it comes to user authentication Authgear provides an extensive suite of authentication features What if you want to receive immediate notifications in Slack when a new user signs up There are many low code tools to achieve this like Zapier and Nn However with Authgear you can integrate both authentication and sending messages This article will guide you through the process of integrating Authgear s Hooks and Events with Slack to achieve just that Why Authgear As Authgear is an identity as a service IDaaS platform that supports various authentication methods like social logins passwordless biometrics logins one time password OTP with SMS WhatsApp and more It has built in customizable login pages you do not have to spend time designing UI and implementing complex authentication flows It s designed to be developer friendly and has Hooks to react to different user related events Authgear offers an in browser code editor where you can write JavaScript Typescript code to add extra logic that is stored and runs on serverless infrastructure maintained by Authgear We are going to use this capability to send Slack message after a new user sign up PrerequisitesAuthgear Account If you do not have one you can sign up for a free Authgear account Configure an application in Authgear Any web based mobile or desktop application will work If you don t have any applications that use Authgear you can create one by following the Authgear Start Building page Slack account If don t have a Slack account sign up for a new free one here and go to the Slack Get Started page Slack workspace You need access to a Slack workspace where you re an admin If you are creating just a new workspace follow this guide Setting up the Slack WebhookBefore integrating Authgear you ll need to create a webhook in Slack Create a Slack WorkspaceAs you can see I created a new workspace called authgear example sign up img alt Create a Slack Workspace lt br gt height src dev to uploads s amazonaws com uploads articles piraowmnsdomklk png width Created a new Admin account there Initiated a new Slack channel named notification sign upwhere we receive a notification when a user signs up Create a Slack AppNavigate to the Slack API page and create a new app from scratch We use it to send the webhook information In the next step you provide the app name and select the workspace that you want to connect the app to Make sure this is the correct app because you can t change the app s workspace later After you pick a workspace click Create App Enable Incoming WebhooksUnder the Add features and functionality section click on Incoming Webhooks and activate them Scroll down and click on Add New Webhook to Workspace Select the channel where notifications should be sent and click Allow Once created you ll receive a Webhook URL containing a secret in a request param Copy this URL as it will be used in the Authgear webhook code Integrating Authgear with Slack WebhookWith the Slack Webhook URL in hand you can now set up the Authgear Hook to respond to the user created event of non blocking type Writing a Hook FunctionNavigate to Advanced gt Hooks section in the Authgear Portal Add a new Non blocking Event Choose the Hook Type as the TypeScript You will write a function to respond to the user creation event and send a notification to Slack Click on Edit Script under the Config option it will bring you to the editor We want to send a POST request to a Slack webhook URL when EventUserCreated is triggered import EventUserCreated from v mod ts export default async function e EventUserCreated Promise lt void gt const url YOUR SLACK WEBHOOK URL Replace the text below with the actual message you want to send const message New account signup e payload identities claims email has joined const payload text message const headers Content Type application json Send a POST request to the Slack webhook URL with the message await fetch url method POST headers headers body JSON stringify payload This async TypeScript function will run after a user is registered Replace YOUR SLACK WEBHOOK URL with the URL copied earlier Once that is done click on Finish Editing and Save the changes on the Hooks page Validate the new hookAfter everything is configured we can test the newly created hook in action The easiest way to test it is by creating a new user from the User Management page in Authgear Portal manually Upon the creation of a new user you should see the new message is delivered with the user s email address example user authgear com to the Slack channel Another way to validate it is when a new user goes through the sign up process after you integrated your system with Authgear App and configured the login method for your users Or you could also use the Try it now option on the Authgear dashboard s Getting Started page After you sign up with an email Slack message will be sent SummaryAuthgear s Hooks provides a customizable way to respond to user related events By integrating with Slack you can receive real time updates on user sign ups directly in your preferred channel Make sure to explore other events and tailor the integration to your specific needs Related resourcesHow Profile Enrichment can boost your product Community Join the Authgear Community on Discord Follow on Twitter Ask questions Check out open source SDKs About the authorVisit my blog www iambobur com | 2023-08-19 15:52:47 |
海外TECH | DEV Community | Notes: Advanced Node.js Concepts by Stephen Grider | https://dev.to/midnqp/notes-advanced-nodejs-concepts-by-stephen-grider-4pp7 | Notes Advanced Node js Concepts by Stephen GriderHere s one of the most common interview questions you ll face when looking for a Node js job Can you explain Node s Event Loop There are two types of engineers those who can describe the Event Loop and those who cannot This course will ensure that you are incredibly well prepared to answer that most important question This is the preface to an advanced course from Stephen Grider an Engineering Architect and a distinguished Udemy Instructor Partner based in San Francisco Bay Area authoring engineering courses including the rd highest rated course on React js in all of Udemy among s of courses Stephen has received over reviews and over a million students studied his published materials The Advanced Node js Concepts course contains aggregate hours of lectures divided into several sections The Internals of NodeEnhancing Node performanceProject SetupData caching with RedisAutomated Headless Browser TestingWiring Up Continuous IntegrationScalable Image File UploadThe first two explores solely the Node js anatomy in considerable depth while the rest address several challenges using standard libraries and approaches in a suspensive manner While benefitting from the course materials I have greatly enjoyed the discoveries and solidified what I already knew Without taking notes information flies away which is why I made sure to do that maintaining a quite high signal to noise ratio as Chuck Zerby mentions in his book The Devil s Details A History of Footnotes The notes may be the most helpful if you already have an introductory idea on Node js and willing to further it It may also be advisable to follow Stephen alongside However I have included addendum wherever seemed relevent So here we go the notes enjoy The Internals of Node jsNode js is not a new programming language rather a runtime built on top of JavaScript A programming language is primarily distinguished through its syntax Node js does not introduce any new syntax In such a manner TypeScript is a new programming language since it introduces new syntax In computing a program can be defined by an executable file stored on disk containing code or binary instructions for the processor A process can be defined as an instance of a program when it is loaded into memory and executed by the processor The operating system allocates and manages resources e g heap stack pointers registers for the process in a secure isolated manner Threads are units of instructions to be executed from a process Scheduling is the order of execution and it refers to the ability of an operating system to decide which thread to process execute in any given time Some threads are more important than others However note the distinction that in Node js threads are best suited for CPU intensive tasks not I O intensive tasks for example any cryptographic computation e g crypto pbkdf Also note that threads are not used in Node js for network I O rather network requests are managed by libuv using underlying functions provided by the operating system e g epoll for Linux kqueue for Mac Further note that having more number of threads does not necessarily improve the file I O performance File read write performance depends on completely different set of factors such as bus speed bus bandwidth storage device etc Inspite of that using a thread from the thread pool to perform file I O is necessary in order to enable asynchronicity Having more threads does in fact mean that we can read more files simultaneously but it doesn t mean the act of reading an individual file becomes faster Thread pool also known as the Worker pool is a collection of worker threads that are managed by the libuv library By default threads are deployed by Node js and the long running operations as referenced in the event loop in truth refer to thread pool tasks Note that the event loop itself does not assign tasks to the thread pool but only checks and runs pending callbacks when the thread pool tasks are complete Thread pool tasks are assigned by the standard libraries e g fs module themselves Custom thread pools tasks can be assigned from a Node js C addon through N API and WebWorker Threads Despite its relative feasibility it may be suggested to use the builtin thread pool instead of creating new workers using the worker threads module In the source code of the Node js opensource project lib folder contains JavaScript code mostly wrappers over C and function definitions On the contrary src folder contains C implementations of the functions which pulls dependencies from the V project the libuv project the zlib project the llhttp project and many more which are all placed at the deps folder For example the latest implementation of the exported function named pbkdf in the file lib internal crypto pbkdf js contains a reference to a class named PBKDFJob However that class is never found among the JavaScript source code rather found at the file src crypto crypto pbkdf h which is made available to internal JavaScript code through const PBKDFJob internalBinding crypto When does libuv and V come into play The purpose of V is to translate C values into their V JavaScript equivalence The libuv project provides file system access some aspects of concurrency and a lot of processing constructs on the C side To process threads well multiple cores are introduced A single core can process multiple threads which is called multi threading or hyperthreading For example let s say Thread is reading from a file and Thread is multiplying x Reading a file always takes a non zero amount time which the OS can detect and put the thread on pause to allow running Thread Threads inside the event loop Node js creates thread by default and executes all code in that one thread There is exactly one Event Loop per Node js process however that Event Loop may initiate other smaller event loops within itself Each iteration in an Event Loop is called a tick Stephen Grider mentions major phases checked by the event loop Pending callbacks of timers to run e g setTimeout setIntervalPending callbacks of system operations and long running operations to run e g epoll inotify init kevent are system operations and Thread Pool tasks are long running operationsPause execution continue only when a new event done for system operationsa new event done for long running operationsa timer is about to completePending callbacks for setImmediate Pending close events to cleanup So the Event Loop makes one more iteration if it detects any pending timers or system operations or long running operations Is Node js single threaded The answer isn t straightforward The Event loop of Node js is single threaded however file I O operations cryptographic operations and some network operations run in multiple threads through the Thread pool ConclusionI can t say I don t yearn for another deeper more advanced series of materials from Stephen Grider or someone alike Nevertheless I do think I have been well packed enough to pursue the next steps in this learning journey by myself Node js API Docs Worker threads Node js Guide Docs Don t Block the Event Loop | 2023-08-19 15:17:14 |
Apple | AppleInsider - Frontpage News | How to get detailed macOS system info using uname | https://appleinsider.com/inside/macos/tips/how-to-get-detailed-macos-system-info-using-uname?utm_medium=rss | How to get detailed macOS system info using unameIf you happen to be using Terminal you can get quick system info through it using the uname command Here s how to use the command line term in macOS There s no doubt that you ve used Apple s System Information app to get information about your Mac at some point of your macOS career But if you happen to be in Apple s Terminal app for some reason here s a quick tip you can use the UNIX uname command to get a quick one line summary of which version of the Darwin core macOS is running Read more | 2023-08-19 15:46:54 |
ニュース | BBC News - Home | William 'sorry' for missing Lionesses World Cup final | https://www.bbc.co.uk/news/uk-66559702?at_medium=RSS&at_campaign=KARANGA | charlotte | 2023-08-19 15:53:16 |
コメント
コメントを投稿