Want to create a Gist from your editor, the command line, or the Services menu? Here's how.
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"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>author</key> | |
<string>Thomas Aylott</string> | |
<key>comment</key> | |
<string>Thomas Aylott ㊷ subtleGradient.com</string> | |
<key>name</key> | |
<string>Brilliance Black (Inverted)</string> |
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
#!/usr/bin/env ruby | |
class DigitConvertor | |
attr_reader :n | |
def initialize(chars) | |
@n = chars.size | |
@chars = chars | |
@chars_hash = Hash[*(@chars).zip((0..@n).to_a).flatten] | |
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
#!/usr/bin/env node | |
var sys = require("sys"); | |
var indented = ""; | |
(function (cb) { | |
if (process.env.TM_SELECTED_TEXT) { | |
return cb(process.env.TM_SELECTED_TEXT); | |
} | |
var buffer = ""; |
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
@interface CustomViewController : UIViewController <UITextViewDelegate> { | |
UITextView *_textView; //対象となるテキストビュー。UIViewControllerのサブビューとして追加する。 | |
} | |
@property (nonatomic, retain) IBOutlet UITextView *_textView; | |
@end | |
@implementation CustomViewController | |
- (void)viewDidLoad { |
This is a quick guide to OAuth2 support in GitHub for developers. This is still experimental and could change at any moment. This Gist will serve as a living document until it becomes finalized at Develop.GitHub.com.
OAuth2 is a protocol that lets external apps request authorization to private details in your GitHub account without getting your password. All developers need to register their application before getting started.
- Redirect to this link to request GitHub access:
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
""" | |
Script to convert a Xcode3 Color theme into a Xcode4 one. | |
Example: | |
bash# python xcode3_theme_to_xcode4.py Twilight.xcolortheme | |
It will write a new file: Twilight.dvtcolortheme into the same folder as the script is residing in. | |
""" | |
import plistlib,sys | |
""" Define boilerplate of the color theme """ | |
defaultConfig = { |
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
////////////////////////////////////////////////// | |
////////////////////////////////////////////////// | |
////////////////////////////////////////////////// | |
// FooDataSource.m | |
- (void)tableViewDidLoadModel:(UITableView*)tableView { | |
NSMutableArray* items = [[NSMutableArray alloc] init]; | |
[self addTableItemsToArray:items]; // Implement yourself for your data | |
TTTableMoreButton *button = [TTTableMoreButton itemWithText:@"Loading More..."]; | |
[items addObject:button]; | |
} |
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
ja: | |
errors: | |
messages: | |
not_found: "は見つかりませんでした" | |
# not_found: "not found" | |
already_confirmed: "は既に登録済みです" | |
# already_confirmed: "was already confirmed" | |
not_locked: "は凍結されていません" | |
# not_locked: "was not locked" |
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
# located at /Applications/TextMate.app/Contents/SharedSupport/Support/lib/scriptmate.rb | |
# change lines 12 - 13: | |
$KCODE = 'u' if (RUBY_VERSION.to_f < 1.9) | |
require "jcode" unless "".respond_to? :each_char | |
# rest of the file is unchanged |
OlderNewer