This file contains hidden or 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
module CustomColumnTypes | |
def double(*args) | |
if !args.last.is_a? Hash | |
args.push({}) | |
end | |
args.last[:limit] = 53 | |
float *args | |
end |
This file contains hidden or 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
// https://gist.github.com/Yaffle/1287361 | |
var crc32table = null; | |
crc32 = function(s) { | |
s = String(s); | |
var polynomial = 0x04C11DB7, | |
initialValue = 0xFFFFFFFF, | |
finalXORValue = 0xFFFFFFFF, | |
crc = initialValue, | |
i, j, c; |
This file contains hidden or 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
#routes.rb | |
get 'scraped_episodes_search' => 'scraped_episodes#search' | |
#scraped_episodes_controller.rb | |
# used for autocomplete search | |
def search |
This file contains hidden or 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
- (CLLocationDistance)getDistanceFrom:(CLLocationCoordinate2D)start to:(CLLocationCoordinate2D)end | |
{ | |
CLLocation *startLoc = [[CLLocation alloc] initWithLatitude:start.latitude longitude:start.longitude]; | |
CLLocation *endLoc = [[CLLocation alloc] initWithLatitude:end.latitude longitude:end.longitude]; | |
CLLocationDistance retVal = [startLoc distanceFromLocation:endLoc]; | |
[startLoc release]; | |
[endLoc release]; | |
return retVal; | |
} |
This file contains hidden or 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
# This is file ~/.gitconfig | |
[merge] | |
tool = extMerge | |
[mergetool "extMerge"] | |
cmd = ~/bin/extMerge.sh \"$BASE\" \"$LOCAL\" \"$REMOTE\" -o \"$MERGED\" |
NewerOlder