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
# Uncomment this line to define a global platform for your project | |
# platform :ios, "6.0" | |
platform :osx, '10.9' # see https://github.com/CocoaPods/CocoaPods/issues/2075 | |
target "NDTrieTest" do | |
pod 'Objective-LevelDB' | |
end |
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 urllib | |
URI = "http://google.com/complete/search?output=firefox&hl=en&q=" | |
def suggest(term): | |
text = urllib.urlopen(URI + urllib.quote(term)).read() | |
arr = eval(text) | |
return arr[1] | |
print suggest("python") |
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
export JAVA_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005" | |
if [ -f ./gradlew ]; then | |
./gradlew "$@" | |
else | |
gradle "$@" | |
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 <AppKit/NSSpellChecker.h> //import AppKit framework | |
void testSpellCheck(){ | |
NSSpellChecker* checker = [NSSpellChecker sharedSpellChecker]; | |
NSString * string = @"helo"; | |
NSRange range = NSMakeRange(0, [string length]); | |
NSArray *corrected = [checker guessesForWordRange:range inString:string language:@"en" inSpellDocumentWithTag:0]; | |
NSLog(@"NSSpellChecker suggestion:%@",corrected); | |
} |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<keymap version="1" name="Mac OS X copy" parent="Mac OS X"> | |
<action id="CloseContent"> | |
<keyboard-shortcut first-keystroke="meta F4" /> | |
<keyboard-shortcut first-keystroke="meta W" /> | |
</action> | |
<action id="DuplicatesForm.SendToLeft"> | |
<keyboard-shortcut first-keystroke="meta 1" /> | |
<keyboard-shortcut first-keystroke="meta T" /> | |
</action> |
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
{ | |
/* Keybindings for emacs emulation. Compiled by Jacob Rus. | |
* | |
* To use: copy this file to ~/Library/KeyBindings/ | |
* after that any Cocoa applications you launch will inherit these bindings | |
* | |
* This is a pretty good set, especially considering that many emacs bindings | |
* such as C-o, C-a, C-e, C-k, C-y, C-v, C-f, C-b, C-p, C-n, C-t, and | |
* perhaps a few more, are already built into the system. | |
* |
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
http://en.wiktionary.org/w/api.php?action=query&format=json&prop=revisions&rvprop=content&titles=test |
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
convert social-link-sprite.png -fuzz 20% -fill '#e4002b' -opaque '#c8102e' output.png |
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
security delete-generic-password -a David -s foobar-service-name | |
security add-generic-password -a David -s foobar-service-name -w my-password | |
security 2>&1 >/dev/null find-generic-password -ga David -s foobar-service-name | |
# see http://blog.macromates.com/2006/keychain-access-from-shell/ |
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
[[NSPasteboard generalPasteboard] clearContents]; | |
[[NSPasteboard generalPasteboard] setString:@"test Pasteboard" forType:NSStringPboardType]; | |
NSString* dataInPasteboard = [[NSPasteboard generalPasteboard] stringForType:NSStringPboardType]; | |
NSLog(dataInPasteboard); |