This article is now published on my website: Prefer Subshells for Context.
function doGet(){ | |
var ss = SpreadsheetApp.openById("//key ommitted"); | |
return exportJSON(ss); | |
} | |
// Exports current sheet as JSON and displays in message box. | |
function exportJSON(ss) { | |
var sheet = ss.getSheetByName("sessions"); | |
var rowsData = getRowsData(sheet); |
This is a local copy of the commands from:
- http://www.jmknoble.net/keys/#master-key
- http://www.macfreek.nl/mindmaster/Convert_GPG_keys_to_subkeys
- http://wiki.fsfe.org/Card_howtos/Card_with_subkeys_using_backups/
This guide serves as a reference of collected information necessary for strict management of PGP keys. This includes keeping a master key that always remains
// Compile with $ gcc -o lmutracker lmu.m -framework IOKit -framework CoreFoundation -framework Foundation | |
// Usage: ./lmu [now] | |
// Prints out the value from the ambient light sensor and the back light LED every 1/10 of a second. Optionally print just one value. | |
// Inspired by the code found at | |
// http://google-mac-qtz-patches.googlecode.com/svn-history/r5/trunk/AmbientLightSensor | |
// and http://osxbook.com/book/bonus/chapter10/light/ | |
// and http://en.wikipedia.org/wiki/Wikipedia:Reference_desk/Archives/Computing/2010_February_10#Mac_OS_X_keyboard_backlight_drivers | |
// http://forums.macrumors.com/showthread.php?t=1133446 | |
#include <stdio.h> |
brew install mutt
- setup an app password for mutt in gmail
- setup an app password for imap_notifier in gmail
brew install terminal-notifier
terminal-notifiergem install imap_notifier
imap_notifierbrew install urlview
brew install w3m
(links
would be OK too)- Install pandoc to author in markdown and send as HTML
This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.
I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.
// Text-to-Speech on OSX | |
// run: swift speech.swift "東京特許許可局" | |
// build: xcrun -sdk macosx swiftc speech.swift && ./speech "東京特許許可局" | |
// | |
// for OSX, use NSSpeechSYnthesizer in AppKit, | |
// (for iOS, use AVSpeechSynthesizer in AVFoundation) | |
import Foundation | |
import AppKit |
// install with: | |
// npm i -g devtool | |
// npm i img javascript-natural-sort electron-canvas-to-buffer | |
// | |
// run: | |
// devtool tile-folder.js -qch | |
var fs = require('fs') | |
var path = require('path') | |
var loadImage = require('img') |
#!/usr/bin/env python3 | |
# This program prints all hcn (highly composite numbers) <= MAXN (=10**18) | |
# | |
# The value of MAXN can be changed arbitrarily. When MAXN = 10**100, the | |
# program needs less than one second to generate the list of hcn. | |
from math import log | |
MAXN = 10**18 |
#!/bin/bash -e | |
# Blocksize to truncate to and buffer by | |
BS=${BS:-4096} | |
SELF="`basename $0`" | |
death() { echo "$SELF:" "$@" >&2; exit 1; } | |
[ $# -eq 2 ] || death "Usage: $SELF original copy" | |
SRC="$1"; DST="$2" |