npx create-react-app@next --scripts-version=@next --template=cra-template@next my-js-app
npx create-react-app@next --scripts-version=@next --template=typescript@next my-ts-app
Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.
If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.
(updated versions of this document, plus more, live here)
This will show you how to get Guix running on WSL2.
We're going to go as "minimal" as possible, without starting off one of the readily available WSL2 distros.
Parts of this guide should help with understanding how to set up any custom distro on WSL, not just Guix.
Disclaimer: I'm a Guix nOOb! (hence going through the trouble of installing it on WSL2)
class Python < Formula | |
desc "Interpreted, interactive, object-oriented programming language" | |
homepage "https://www.python.org/" | |
url "https://www.python.org/ftp/python/3.8.6/Python-3.8.6.tar.xz" | |
sha256 "a9e0b79d27aa056eb9cce8d63a427b5f9bab1465dee3f942dcfdb25a82f4ab8a" | |
head "https://github.com/python/cpython.git" | |
license "Python-2.0" | |
revision 1 | |
bottle do |
Keywords: Java, JDK (Java Development Kit), MacOS, Homebrew, Specific Version
This how-to guide covers how to install different versions of the JDK on MacOS with Homebrew.
#!/usr/bin/env python3 | |
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
# generate server.xml with the following command: | |
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
# run as follows: | |
# python simple-https-server.py | |
# then in your browser, visit: | |
# https://localhost:4443 | |
import http.server |
function setUserAgent(window, userAgent) { | |
// Works on Firefox, Chrome, Opera and IE9+ | |
if (navigator.__defineGetter__) { | |
navigator.__defineGetter__('userAgent', function () { | |
return userAgent; | |
}); | |
} else if (Object.defineProperty) { | |
Object.defineProperty(navigator, 'userAgent', { | |
get: function () { | |
return userAgent; |