Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
# wget https://github.com/0xbadfca11/miniwsl/releases/download/release3041562/rootfs.tgz | |
# wsl --import guix /guix rootfs.tgz --version 2 | |
# wsl -d guix /bin/busybox sh -c "/mnt/c/sys/misc/guix-infect.sh" | |
mkdir -p /root /etc /tmp /var/run /run /home | |
chmod 1777 /tmp | |
rm /etc/passwd | |
cat <<EOM >> /etc/passwd | |
root:x:0:0:root:/root:/bin/bash | |
guixbuilder01:x:999:999:Guix build user 01:/var/empty:/usr/sbin/nologin | |
guixbuilder02:x:998:999:Guix build user 02:/var/empty:/usr/sbin/nologin |
{ pkgs, lib, config, ... }: | |
{ | |
networking = { | |
firewall.allowedTCPPorts = [ | |
3000 # grafana | |
9090 # prometheus | |
9093 # alertmanager | |
]; | |
useDHCP = true; | |
}; |
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
#!/bin/bash | |
# | |
# Copyright (c) 2013 Maximilian Antoni | |
# | |
export TEST_COLOR_GREEN="\033[1m\033[32m" | |
export TEST_COLOR_RED="\033[1m\033[31m" | |
export TEST_COLOR_TITLE="\033[1m\033[36m" | |
export TEST_COLOR_OFF="\033[0m" | |
export TEST_SPACES=" " | |
export TEST_LINE="-----------------------------------------------------" |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
#!/bin/bash | |
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF | |
appify v3.0.1 for Mac OS X - http://mths.be/appify | |
Creates the simplest possible Mac app from a shell script. | |
Appify takes a shell script as its first argument: | |
`basename "$0"` my-script.sh |