Skip to content

Instantly share code, notes, and snippets.

View LFabien's full-sized avatar
🎯
Focusing

Fabien LFabien

🎯
Focusing
View GitHub Profile
@idoru
idoru / XCode_SwapBetweenSpec.scpt
Created November 17, 2010 05:36
[Not compatible with XCode 4] Ever wanted to switch between Cedar specs and your implementation with a single keystroke? Well, there's a user script for that!
(*
SwapBetweenSpec.scpt
Get into the BDD groove with this Xcode user script which quickly toggles between your implementation (or header)
and its Cedar Spec. Bind it to your favorite shortcut key and enjoy the cycle.
Be sure to add this User Script to Xcode as an Applescript, not a shell script:
1. Paste the contents of the gist into ~/Library/Application Support/Developer/Shared/Xcode/User Scripts/SwapBetweenSpec.scpt
2. When adding to script in the "Edit User Scripts" window of Xcode, choose "Add Script File..." and not "New Shell Script" and then choose the file from (1)
3. Set Input to "No Input"
module MockSnowflake
TWEPOCH = 1142974214000
WORKERIDBITS = 5
DATACENTERIDBITS = 5
MAXWORKERID = -1 ^ (-1 << WORKERIDBITS)
SEQUENCEBITS = 12
WORKERIDSHIFT = SEQUENCEBITS
DATACENTERIDSHIFT = SEQUENCEBITS + WORKERIDBITS
TIMESTAMPLEFTSHIFT = SEQUENCEBITS + WORKERIDBITS + DATACENTERIDBITS
@mystix
mystix / .aliases
Created September 27, 2010 19:11
OSX dot config files
# ls shortcuts
alias ls='ls -G'
alias ll='ls -Flh'
# git shortcuts
function git_discard {
# note: only works in zsh shell
echo "Discard all changes? "
read -q REPLY
Flying Lotus - Lit Up (Instrumental)
Phaseone - Cadence + Athena
Gary Numan - Films
Hovatron - Gypsy Trader
The Field - The More That I Do (Foals remix)
Surfs - Tu Seras Mi Baby
The Very Best - Cape Cod Kwassa Kwassa
Orchestre N'guewel - Mi Guajeo
Harvard Bass - 81 (Renaissanceman remix)
Znobia - Tchilo (Diplo remix)