I hereby claim:
- I am jessearmand on github.
- I am jessearmand (https://keybase.io/jessearmand) on keybase.
- I have a public key ASD5t-v5WMuSFh19tH9pKmg2hcXYuEIMY0nOOhjh7OnWxgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| function slow_hash(str) { | |
| var hash = 0, i, chr, len; | |
| if (str.length === 0) return hash; | |
| for (i = 0, len = str.length; i < len; i++) { | |
| chr = str.charCodeAt(i); | |
| hash = ((hash << 5) - hash) + chr; | |
| hash |= 0; // Convert to 32bit integer | |
| // max of integer in javascript is 2^53 | |
| // http://stackoverflow.com/questions/307179/ |
| import Foundation | |
| class Answer { | |
| let questionId = 0 | |
| let answerId = 0 | |
| let answer: String? | |
| } | |
| public class Question { | |
| let questionId = 0 |
| { | |
| "isbn12345": { | |
| "title": "Introdution to Algorithms", | |
| "available": true, | |
| "borrow_date": 1405062840, | |
| "due_date": 1405102840, | |
| "student334343": { | |
| "name": "Sergey Brin", | |
| "books": ["isbn12345", "isbn12346"] | |
| } |
| #!/bin/sh | |
| # unregister broken GHC packages. Run this a few times to resolve dependency rot in installed packages. | |
| # ghc-pkg-clean -f cabal/dev/packages*.conf also works. | |
| function ghc-pkg-clean() { | |
| for p in `ghc-pkg check $* 2>&1 | grep problems | awk '{print $6}' | sed -e 's/:$//'` | |
| do | |
| echo unregistering $p; ghc-pkg $* unregister $p | |
| done | |
| } |
| #!/bin/sh | |
| ghc-pkg check --simple-output | xargs -n 1 ghc-pkg unregister --force |
| [{"name":"Israel","dial_code":"+972","code":"IL"},{"name":"Afghanistan","dial_code":"+93","code":"AF"},{"name":"Albania","dial_code":"+355","code":"AL"},{"name":"Algeria","dial_code":"+213","code":"DZ"},{"name":"AmericanSamoa","dial_code":"+1 684","code":"AS"},{"name":"Andorra","dial_code":"+376","code":"AD"},{"name":"Angola","dial_code":"+244","code":"AO"},{"name":"Anguilla","dial_code":"+1 264","code":"AI"},{"name":"Antigua and Barbuda","dial_code":"+1268","code":"AG"},{"name":"Argentina","dial_code":"+54","code":"AR"},{"name":"Armenia","dial_code":"+374","code":"AM"},{"name":"Aruba","dial_code":"+297","code":"AW"},{"name":"Australia","dial_code":"+61","code":"AU"},{"name":"Austria","dial_code":"+43","code":"AT"},{"name":"Azerbaijan","dial_code":"+994","code":"AZ"},{"name":"Bahamas","dial_code":"+1 242","code":"BS"},{"name":"Bahrain","dial_code":"+973","code":"BH"},{"name":"Bangladesh","dial_code":"+880","code":"BD"},{"name":"Barbados","dial_code":"+1 246","code":"BB"},{"name":"Belarus","dial_code":"+375"," |
| - (BOOL)stringContainsEmoji:(NSString *)string { | |
| __block BOOL returnValue = NO; | |
| [string enumerateSubstringsInRange:NSMakeRange(0, [string length]) options:NSStringEnumerationByComposedCharacterSequences usingBlock: | |
| ^(NSString *substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop) { | |
| const unichar hs = [substring characterAtIndex:0]; | |
| // surrogate pair | |
| if (0xd800 <= hs && hs <= 0xdbff) { | |
| if (substring.length > 1) { | |
| const unichar ls = [substring characterAtIndex:1]; |
| #!/bin/sh | |
| XCODEUUID=`defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID` | |
| defaults write ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/$1.xcplugin/Contents/Info DVTPlugInCompatibilityUUIDs -array-add $XCODEUUID |
| dpkg --purge `dpkg --get-selections | grep deinstall | cut -f1` |