Skip to content

Instantly share code, notes, and snippets.

@subtleGradient
subtleGradient / Brilliance Black (Inverted).tmTheme
Created January 3, 2010 22:52
Brilliance Black, My Little Pony (Brilliance White), Brilliance Dull TextMate Themes in the `tmTheme` format. By Thomas Aylott (SubtleGradient). These themes were designed so that logically similar things will have similar colors. These are extremely rich
<?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>
#!/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
@isaacs
isaacs / json-prettify.js
Created March 4, 2010 08:57
A textmate command to prettify JSON so that it looks more like the node repl's sys.inspect() output.
#!/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 = "";
@interface CustomViewController : UIViewController <UITextViewDelegate> {
UITextView *_textView; //対象となるテキストビュー。UIViewControllerのサブビューとして追加する。
}
@property (nonatomic, retain) IBOutlet UITextView *_textView;
@end
@implementation CustomViewController
- (void)viewDidLoad {
@defunkt
defunkt / clients.md
Created April 18, 2010 14:09
A list of Gist clients.

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support

@technoweenie
technoweenie / github_oauth_busy_developer_guide.md
Created May 30, 2010 18:34
GitHub OAuth Busy Developer's Guide

GitHub OAuth Busy Developer's Guide

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.

Web Application Flow

  • Redirect to this link to request GitHub access:
"""
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 = {
//////////////////////////////////////////////////
//////////////////////////////////////////////////
//////////////////////////////////////////////////
// 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];
}
ja:
errors:
messages:
not_found: "は見つかりませんでした"
# not_found: "not found"
already_confirmed: "は既に登録済みです"
# already_confirmed: "was already confirmed"
not_locked: "は凍結されていません"
# not_locked: "was not locked"
@ggilder
ggilder / TextMate_scriptmate_fix.rb
Created November 3, 2010 22:35
Fix TextMate's scriptmate.rb to work with Ruby 1.9
# 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