Skip to content

Instantly share code, notes, and snippets.

@halcyon
halcyon / start-jnpr-vpn.sh
Created November 19, 2016 06:16 — forked from oogali/start-jnpr-vpn.sh
Shell script to connect to Juniper SSL VPNs w/o need for a browser or Java
#!/bin/sh
##
## netscreen/jnpr ssl vpn connection magic
## [email protected] / @oogali
##
## i wrote this about a year ago (2009), when i had continuous access
## to a jnpr ssl vpn box and had to connect via it.
##
## if bits of this script are broken, i'll be glad to fix if someone
## gives me client access to a ssl vpn box to test against.
@halcyon
halcyon / gpg2qrcodes.sh
Last active April 1, 2019 19:00 — forked from joostrijneveld/gpg2qrcodes.sh
Producing printable QR codes for persistent storage of GPG private keys
# Heavily depends on:
# libqrencode (fukuchi.org/works/qrencode/)
# paperkey (jabberwocky.com/software/paperkey/)
# zbar (zbar.sourceforge.net)
# Producing the QR codes:
# Split over 4 codes to ensure the data per image is not too large.
gpg --export-secret-key KEYIDGOESHERE | paperkey --output-type raw | base64 > temp
split temp -n 4 IMG
for f in IMG*; do cat $f | qrencode -o $f.png; done
@halcyon
halcyon / clojure-transduce-reduce.md
Created August 4, 2016 04:42 — forked from runexec/clojure-transduce-reduce.md
Clojure's Transducers and Reducers

Transducers and Reducers

Notes and examples of Transducers and Reducers

Reducers

  • Used on collections

  • Eager evaluation only. (not lazy)

@halcyon
halcyon / .profile
Created August 1, 2016 17:11 — forked from bmhatfield/.profile
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@halcyon
halcyon / .profile
Created August 1, 2016 16:12 — forked from sindresorhus/.profile
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
commit 76cdb27baaa877c5c3dc4a10519b55094425775e
Merge: 51db204 e39796d
Author: Scott McLeod <[email protected]>
Date: Tue Jul 26 13:45:41 2016 -0400
Merge branch 'master' of github.com:joshuaNjordan85/wolo2
commit e39796de78f544ba4df8252676a3888dd69abefd
Merge: df64c71 d6cc747
Author: Joshua N. Jordan <[email protected]>
(.log js/console @re-frame.db/app-db)
(.log js/console (.keys js/Object (.. this -refs -messages)))
db.examples.find({"var.name": "sequential?"})
A VT100 terminal couldn't do that, because there is no ^( control character corresponding to (. However, xterm has the so-called "modifyOtherKeys" mode, which does allow to send unique keycodes for combinations like that.
To enable it, set the modifyOtherKeys resource, e.g. in ~/.Xdefaults:
XTerm*vt100.modifyOtherKeys: 1
With that, Ctrl+( will send the following keycode:
^[[27;6;40~
That's rather long though, so another format for keycodes like that was introduced, which can be enabled by setting the formatOtherKeys resource:
XTerm Control Sequences
Edward Moy
University of California, Berkeley
Revised by
Stephen Gildea
X Consortium (1994)