View find-block-type.sh
#!/bin/bash | |
# search term> i | |
# (partial-name-match) image | |
# (partial-name-match) instagram | |
# (partial-keyword-match) gallery | |
# search term> ig | |
# (exact-keyword-match) instagram | |
# search term> im | |
# (partial-name-match) image |
View find-block-types.awk
# Invoke with | |
# | |
# awk -f script.awk -v term=li blocktypes.tsv | |
# | |
# With blocktypes.tsv: | |
# | |
# list List ul,ol | |
# revue Revue list | |
# paragraph Paragraph text | |
# image Image image,picture |
View x.sh
#!/bin/bash | |
CMD=$(basename "$0") | |
CONF="$HOME/.x.conf" | |
# shellcheck disable=1090 | |
[ -f "$CONF" ] && source "$CONF" | |
X_BASE=${X_BASE:-$HOME/Desktop} | |
X_LOG=${X_LOG:-$X_BASE/log.txt} | |
X_ARCHIVE_TEMPLATE=${X_ARCHIVE_TEMPLATE:-+$X_BASE/tasks-%Y-%m-%d.txt} |
View derp-case.js
#!/usr/bin/env node | |
const fs = require('fs'); | |
const readline = require('readline'); | |
const rl = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout, | |
terminal: false, | |
}); |
View wp-env-test-docker-load.sh
set -e | |
# Clean | |
if pgrep -f Docker.app ; then | |
echo "Please manually quit Docker and try again." | |
exit 1 | |
fi | |
# Prep | |
echo "Starting Docker daemon…" |
View ffmpeg2gif
#!/bin/sh | |
ffmpeg -i "$1" -vf "fps=10,scale=740:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 output.gif |
View my-test.php
<?php | |
/* | |
Plugin Name: Test | |
*/ | |
function my_test_enqueue_scripts() { | |
wp_enqueue_style( | |
'my-test-style', | |
plugins_url( 'style.css', __FILE__ ) | |
); |
View proj.sh
#!/bin/sh | |
set -e | |
callee="$1" | |
invocation="$@" | |
target="" | |
case "$callee" in | |
docker-compose) |
View bisect-script.sh
#!/bin/bash | |
TEST_SUITE="change-detection" | |
TEST_NAME="consecutive edits" | |
E2E_PATCH="bisect-e2e.diff" | |
skip() { | |
echo Skipping: $@; exit 125 | |
} |
View .vimrc
let mapleader = " " | |
let maplocalleader = " " | |
filetype plugin on | |
" === Begin Plug | |
if empty(glob('~/.vim/autoload/plug.vim')) | |
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs | |
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC | |
endif |
NewerOlder