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 | |
open -a iTerm "$SRCROOT" |
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/zsh | |
test -f /etc/pam.d/sudo_local && exit 0 | |
test -f /usr/lib/pam/pam_tid.so.2 || exit 1 | |
if ! grep -Eq '^auth\s.*\spam_tid\.so$' /etc/pam.d/sudo; then | |
pam_sudo=$(awk 'fixed||!/^auth /{print} !fixed&&/^auth/{print "auth sufficient pam_tid.so";print;fixed=1}' /etc/pam.d/sudo) | |
sudo tee /etc/pam.d/sudo <<<"$pam_sudo" | |
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
import Data.List (intersperse) | |
digitToWord :: Int -> String | |
digitToWord 0 = "zero" | |
digitToWord 1 = "one" | |
digitToWord 2 = "two" | |
digitToWord 3 = "three" | |
digitToWord 4 = "four" | |
digitToWord 5 = "five" | |
digitToWord 6 = "six" |
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
{-# LANGUAGE BangPatterns, CPP #-} | |
{-# OPTIONS_GHC -fno-warn-name-shadowing -fwarn-unused-imports #-} | |
-- -Wall | |
-- A module for stream processing built on top of Control.Monad.Par | |
-- (In the future may want to look into the stream interface used by | |
-- the stream fusion framework.) | |
module Stream |
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
collatz :: Integer -> [Integer] | |
collatz 1 = [1] | |
collatz n = n : (collatz $ collatzNext n) | |
where | |
collatzNext :: Integer -> Integer | |
collatzNext n | even n = n `div` 2 | |
collatzNext n | odd n = 3 * n + 1 | |
collatzLength :: Integer -> Int | |
collatzLength n = length $ collatz 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
import Data.Char | |
charLength :: Char -> Int | |
charLength x | |
| isAscii x = 1 | |
| otherwise = 2 | |
asciiLength :: String -> Int | |
asciiLength "" = 0 | |
asciiLength (x:xs) = charLength x + asciiLength xs |
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 | |
create_imagesets() { | |
for file in * ; do | |
if [ -f $file ] ; then | |
file_base=${file%.*} | |
imageset_base=${file_base%~iphone} | |
imageset_base=${file_base%~ipad} | |
imageset_base=${imageset_base%@2x} | |
dir=$imageset_base".imageset" |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer] | |
"link"=hex:00,00,00,00 |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\Keyboard Layout] | |
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00 |
NewerOlder