Notes and examples of Transducers and Reducers
- 
Used on collections 
- 
Eager evaluation only. (not lazy) 
| #!/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. | 
| # 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 | 
| # 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 | 
| # 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) |