e[dit] | evil-edit |
w[rite] | evil-write |
wa[ll] | evil-write-all |
sav[eas] | evil-save |
r[ead] | evil-read |
b[uffer] | evil-buffer |
bn[ext] | evil-next-buffer |
bp[revious] | evil-prev-buffer |
bN[ext] | bprevious |
sb[uffer] | evil-split-buffer |
View docker-compose.yml
--- | |
version: "2" | |
services: | |
vpn: | |
image: bubuntux/nordvpn | |
container_name: vpn | |
cap_add: | |
- net_admin | |
devices: | |
- /dev/net/tun |
View docker-compose.yml
#Reference: https://www.smarthomebeginner.com/docker-home-media-server-2018-basic | |
version: "3.6" | |
services: | |
nginx-proxy: | |
image: jwilder/nginx-proxy | |
container_name: nginx | |
ports: | |
- "80:80" | |
volumes: |
View ghostscript-pdf-crop.sh
#!/usr/bin/env bash | |
set -euo pipefail | |
origdir=$(pwd) | |
tmpdir=$(mktemp -d) | |
echo "tmpdir: $tmpdir" | |
read -r width height < <(pdfinfo $1 | grep "Page size:" | sed 's/[a-zA-Z: ]*\([0-9]\+\)[x ]*\([0-9]\+\).*/\1 \2/') | |
npages=$(pdfinfo $1 | grep "Pages:" | sed 's/Pages: \+\([0-9]\+\).*/\1/') | |
echo "page count: $npages" | |
echo "(width, height) = ($width, $height)" |
View docker-compose.yml
version: '3' | |
services: | |
plex: | |
image: plexinc/pms-docker:beta | |
container_name: plex | |
restart: always | |
network_mode: host | |
volumes: | |
- $PWD/plex/config:/config |
View crypto.sh
#!/usr/bin/env bash | |
set -e | |
function yesno() { | |
read -p "$1 Continue? (y/n): " | |
case $(echo -e "$REPLY" | tr '[A-Z]' '[a-z]') in | |
y|yes) echo "yes" ;; | |
*) echo "no" ;; | |
esac |
View all ex commands.org
View electron-codesigner.sh
# Invoke this script with a relative `.app` path | |
# EX: | |
# codesign.sh "dist/osx/MyApp-darwin-x64/MyApp.app" | |
# I had better luck using the iPhoneOS codesign_allocate | |
export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate" | |
#export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate" | |
# Next two are specified in Apple docs: | |
# export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/usr/bin/codesign_allocate" |
View irc.md
IRC Reference
Not intended as a guide for newbies, more like a "cheat sheet" for the somewhat experienced IRC user, especially one who wields some power over a channel.
The Basics
/join #channel
- Joins the specified channel.
/part #channel
- Leaves the specified channel.
View pdfcrop.py
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Pdfcrop | |
======= | |
Based on pdfcrop.pl_. Uses the BoundingBox [#]_ | |
Dependencies: | |
- PyPDF2_ |
View node-and-npm-in-30-seconds.sh
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
NewerOlder