Skip to content

Instantly share code, notes, and snippets.

View YoniTsafir's full-sized avatar

Yoni Tsafir YoniTsafir

View GitHub Profile
@darkseed
darkseed / Iphone-idleTimer.m
Created January 10, 2011 02:32
Disable/Enable the iOS idle times to prevent screen dimming
// Disable
[[UIApplication sharedApplication] setIdleTimerDisabled:YES];
// Enable
[[UIApplication sharedApplication] setIdleTimerDisabled:NO];
@abyx
abyx / gol.rb
Created January 31, 2012 06:36
Final exercise at Corey Haines' Improving Your TDD workshop
class Board
def initialize
@living = []
end
def evolve_dead_cells
end
def add_living_cell(location)
@abyx
abyx / Board.lua
Created June 7, 2012 05:14
Game of Life in Codea | Video available here http://www.youtube.com/watch?v=G5yg64joL-8
Board = class()
CELL_SIZE = 30
function Board:init(size)
self.grid = {}
for i = 1, size do
self.grid[i] = {}
for j = 1, size do
self.grid[i][j] = false
/**
Provides the ability to verify key paths at compile time.
If "keyPath" does not exist, a compile-time error will be generated.
Example:
// Verifies "isFinished" exists on "operation".
NSString *key = SQKeyPath(operation, isFinished);
// Verifies "isFinished" exists on self.
Install s3fs on Mac OS X
1 - Install Homebrew - http://brew.sh/
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
2 - Use Homebrew to install s3fs + dependencies
brew install s3fs
3 - Do some custom stuff. I only used the first step from here -> https://gist.github.com/fukayatsu/3910097
sudo /bin/cp -rfX /usr/local/Cellar/fuse4x-kext/0.9.2/Library/Extensions/fuse4x.kext /Library/Extensions