(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git$ nano ~/.zshrcpath=('/path/to/depot_tools' $path)While this gist has been shared and followed for years, I regret not giving more background. It was originally a gist for the engineering org I was in, not a "general suggestion" for any React app.
Typically I avoid folders altogether. Heck, I even avoid new files. If I can build an app with one 2000 line file I will. New files and folders are a pain.
| #!/usr/bin/env bash | |
| # | |
| # Copyright (C) 2012-2014 Jason A. Donenfeld <Jason@zx2c4.com> | |
| # Copyright (C) 2015 SitePoint Pty Ltd. | |
| # | |
| # This file is licensed under the GPLv2+. | |
| # | |
| # Make Me A Password | |
| # | |
| # Generate a random password and copy it to the clipboard. Some code |
It's a common misconception that [William Shakespeare][1] and [Miguel de Cervantes][2] died on the same day in history - so much so that UNESCO named April 23 as [World Book Day because of this fact][3]. However because England hadn't yet adopted [Gregorian Calendar Reform][4] (and wouldn't until [1752][5]) their deaths are actually 10 days apart. Since Ruby's Time class implements a [proleptic Gregorian calendar][6] and has no concept of calendar reform then there's no way to express this. This is where DateTime steps in:
>> shakespeare = DateTime.iso8601('1616-04-23', Date::ENGLAND)
=> Tue, 23 Apr 1616 00:00:00 +0000
>> cervantes = DateTime.iso8601('1616-04-23', Date::ITALY)
=> Sat, 23 Apr 1616 00:00:00 +0000
| const copyToClipboard = str => { | |
| const el = document.createElement('textarea'); // Create a <textarea> element | |
| el.value = str; // Set its value to the string that you want copied | |
| el.setAttribute('readonly', ''); // Make it readonly to be tamper-proof | |
| el.style.position = 'absolute'; | |
| el.style.left = '-9999px'; // Move outside the screen to make it invisible | |
| document.body.appendChild(el); // Append the <textarea> element to the HTML document | |
| const selected = | |
| document.getSelection().rangeCount > 0 // Check if there is any content selected previously | |
| ? document.getSelection().getRangeAt(0) // Store selection if found |
| # coding=utf-8 | |
| # Copyright 2023 The HuggingFace Inc. team. All rights reserved. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software |
| # Prerequisites: | |
| # 1. The SkyPilot server must be prepared ahead. | |
| # 2. SkyPilot installation: https://docs.skypilot.co/en/latest/getting-started/installation.html | |
| # Connect to the remote server | |
| sky api login -e http://$WEB_USERNAME:$WEB_PASSWORD@ip-address/ | |
| # Verify cloud access | |
| sky check |