most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat
Create "rescue" partition, do minimal installation, boot (replace ? with root partition device): | |
[Grub console:] | |
> set root=(hd0,gptX) | |
> linux /vmlinuz root=/dev/? | |
> initrd /initrd.img | |
> boot | |
Bring it up to date and install cryptsetup. |
Tl;dr: | |
gunzip --to-stdout logfile-*.gz | grep " 404 " | cut -d " " -f 7 | sort | uniq -c | sort --numeric-sort --reverse > unique-404s.txt | |
Starting with a bunch of gzipped log files, like "logfile-*.gz". | |
First, uncompress to stdout: | |
gunzip --to-stdout logfile-*.gz |
rsync --checksum --human-readable --archive --verbose --compress --partial --progress --rsh=ssh <host>:<remote-path> <local-path> | |
* Note: if <path> ends with /, the specified directory is not included in the copy, just its contents (recursively). I.e., to copy a remote "folder" to a local "folder", without copying the folder itself, include a trailing "/" in the remote path. | |
Options: | |
--checksum: skip based on checksum, not mod-time & size | |
--human-readable: output numbers in a human-readable format | |
--archive: archive mode; same as -rlptgoD (no -H) | |
-r, --recursive: recurse into directories | |
-l, --links: copy symlinks as symlinks |
<!--#if expr="v('REQUEST_URI') =~ m#^/contact#" --> | |
<!--#set var="pathclass" value="contact" --> | |
<!--#elif expr="v('REQUEST_URI') =~ m#^/work#" --> | |
<!--#set var="pathclass" value="work" --> | |
<!--#elif expr="v('REQUEST_URI') =~ m#^/$#" --> | |
<!--#set var="pathclass" value="about" --> | |
<!--#endif --> | |
<html lang="en-US" class="<!--#echo var="pathclass" -->"> |
#!/bin/bash | |
export WDHIST=( $(pwd) ) | |
function cd { | |
builtin cd $* | |
if [ $? -eq 0 ]; then | |
WDHIST[${#WDHIST[*]}]=$(pwd) | |
fi | |
} |
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain site.crt |
function longrunning() {
const timestamp = process.hrtime(); // returns high-resolution array pair: [seconds, nanoseconds]
// ...
// do something
// ...
const elapsed = (([sec, ns] = process.hrtime(timestamp)) => ((sec + (ns / 1e9)) * 1e3))(); // converts [seconds, nanoseconds] into milliseconds
}
certbot certonly [--dry-run] --manual --preferred-challenges dns-01 \
--domain example.com --domain www.example.com [...]
For each host passed via --domain
, Let's Encrypt will prompt the user to create an _acme-challenge
TXT record (_acme-challenge.example.com
, _acme-challenge.www.example.com
, etc.) with a specific value.
It is possible to update the kernel to the most recent backports version during installation.
Proceed with an expert installation all the way through configuring the package manager, and ensure the Backports option is selected.
Switch to the console (Alt-F2), and chroot into the installation:
mount --rbind /dev/ /target/dev/
mount --rbind /run/ /target/run/
mount --rbind /sys/ /target/sys/