- hackmd version: https://hackmd.io/Iwe0MVlwRpOMZ70W1ZwPtQ?view
- gist version: https://gist.github.com/bluet/5ebdfb65f486e01c13175dcdedf27906
[TOC]
This is a HOWTO for database record/value version control, not for schema.
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
[TOC]
This is a HOWTO for database record/value version control, not for schema.
/* | |
Copy this into the console of any web page that is interactive and doesn't | |
do hard reloads. You will hear your DOM changes as different pitches of | |
audio. | |
I have found this interesting for debugging, but also fun to hear web pages | |
render like UIs do in movies. | |
*/ | |
const audioCtx = new (window.AudioContext || window.webkitAudioContext)() |
#SingleInstance Force | |
!1:: | |
SetDefaultKeyboard(0x0409) ;; 切換為英文輸入 | |
return | |
!2:: | |
SetDefaultKeyboard(0x0404) ;; 切換為中文輸入 | |
return |
This guide is for 'linuxing-up' Windows as a development environment; it focuses on setting up [WSL], an Ubuntu Hyper-V virtual machine, [wsltty] (a nice terminal emulator) and various tweaks.
#!/bin/bash | |
# Usage | |
# $ ./install-cert-macos.sh "/path/to/cert" | |
CERT_PATH="$1" | |
# First, grab the SHA-1 from the provided SSL cert. | |
CERT_SHA1=$(openssl x509 -in "$CERT_PATH" -sha1 -noout -fingerprint | cut -d "=" -f2 | sed "s/://g") | |
# Next, grab the SHA-1s of any standard.dev certs in the keychain. | |
# Don't return an error code if nothing is found. |
You may want a linter plugin to lint your code in Vim but you probably don't need it. At least try the built-in way before jumping on the plugin bandwagon.
autocmd FileType <filetype> setlocal makeprg=<external command>
This autocommand tells Vim to use <external command>
when invoking :make %
in a <filetype>
buffer. You can add as many similar lines as needed for other languages.
#!/usr/bin/env bash | |
VERSION=4.0.1 | |
SCRIPT=`basename "$0"` | |
APPNAME="My App" | |
APPICONS="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/GenericApplicationIcon.icns" | |
OSX_VERSION=`sw_vers -productVersion` | |
PWD=`pwd` | |
function usage { |
#!/bin/bash | |
# Usage: ./icon.sh icon.png | |
icon=$1 | |
icon_name=${icon%.*} | |
icon_dir=${icon}.iconset | |
icon_tmp_path=/tmp/${icon_dir} |
See https://github.com/romainl/vim-rnb for an up-to-date version.