- 397g tin of sweetened condensed milk. Don't confuse this with evaporated milk.
- 200ml milk
- 1kg sugar
- A piece of butter around the size of a walnut
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# One `brew install watch` later... | |
watch -n 5 ./pester.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Will generate passwords up to 76 characters long. | |
# | |
# Change the 20 at the end to change the length. | |
dd if=/dev/urandom count=1 2> /dev/null | base64 | sed -ne 2p | cut -c-20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require "fileutils" | |
output_folder_name = "_ipad_selection" | |
output = File.expand_path File.join(Dir.pwd, output_folder_name) | |
selected = [] | |
# Gather folders to look at | |
folders = Dir.glob(%w{*/*.epub */*.pdf}).map {|file| File.dirname file} | |
folders.delete_if { | item | item.match(/^#{output_folder_name}/)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require "fileutils" | |
folder_map = {} | |
def make_folder_name name | |
return name.gsub /_/, " " | |
end | |
# Gather all the files in this directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo Tilde:~ | |
echo HOME:$HOME | |
if [ `whoami` != 'root' ]; then | |
sudo $0 $* || exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Emulate pbcopy and pbpaste for copying to and from the pasteboard/clipboard | |
# | |
# via: http://whereswalden.com/2009/10/23/pbcopy-and-pbpaste-for-linux/ | |
alias pbcopy='xsel --clipboard --input' | |
alias pbpaste='xsel --clipboard --output' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################ | |
# Uncomment if you want the script to always use the scripts | |
# directory as the folder to look through | |
#REPOSITORIES="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
REPOSITORIES=`pwd` | |
IFS=$'\n' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def mnemlog(message): | |
import datetime | |
mnemlog = open("/Users/mnem/mnemlog","a+",0) | |
mnemlog.write(str(datetime.datetime.now()) + " " + message + "\n") | |
mnemlog.close() | |
mod = __import__("__builtin__"); | |
mod.mnemlog = mnemlog | |
mnemlog("It has been done") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getSize(a):4 | |
getSize(b):4 | |
getSize(TestClass):880 | |
getSize(this):428 | |
getSize(a):4 | |
getSize(aa):4 | |
getSize(b):4 | |
getSize(TestClass):884 | |
getSize(this):428 |