Skip to content

Instantly share code, notes, and snippets.

View matsuda's full-sized avatar

Kosuke Matsuda matsuda

  • Tokyo, Japan
View GitHub Profile
@iansoper
iansoper / CodaLight.scpt
Created December 15, 2010 15:35
Open your web development project in TextMate + Transmit + Terminal (kinda like Coda)
-- Coda Light
--
-- By Henrik Nyh <http://henrik.nyh.se>, 2007-04-26
-- His original script: http://henrik.nyh.se/2007/04/coda-light-applescript
--
-- Changes for Transmit 4 and AppleScript 2 by Ian Soper <http://iansoper.com>, 2010-12-15
--
-- An AppleScript to start working on a web development project by
-- * opening the project in TextMate,
-- * opening related URLs in the default browser,
@lenary
lenary / gitconfig.ini
Created February 18, 2011 01:21
a special excerpt of my gitconfig
$ git clone github:lenary/guides.git
Cloning into guides...
remote: Counting objects: 255, done.
remote: Compressing objects: 100% (216/216), done.
remote: Total 255 (delta 111), reused 163 (delta 35)
Receiving objects: 100% (255/255), 1.49 MiB | 564 KiB/s, done.
Resolving deltas: 100% (111/111), done.
$ cd guides
$ git remote -v
@osteslag
osteslag / IR_Black.dvtcolortheme
Created February 20, 2011 10:54
IR_Black theme for Xcode 4, based on IR_Black for Xcode 3 by David Zhou, based on IR_Black for TextMate by Todd Werth. See links in comments below.
<?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>DVTConsoleDebuggerInputTextColor</key>
<string>0.811765 0.796078 0.564706 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>Inconsolata - 16.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>1 1 1 1</string>
# see also: http://d.hatena.ne.jp/takahashim/20101201/p1
class ActionMailer::Base
def process_with_fix_encoding(*args)
process_without_fix_encoding(*args)
message.transport_encoding = '8bit'
end
alias_method_chain :process, :fix_encoding
end
@dakatsuka
dakatsuka / mail_patch.rb
Created March 27, 2011 18:55
ドットが連続したメールアドレスに対処するパッチ(Mail::Message.from)
# coding: utf-8
module Mail
class Message
def from_with_patch_rfc_violation
str = from_without_patch_rfc_violation
begin
str = str.join
rescue
@juno
juno / gemref
Created April 9, 2011 17:23
display runtime gem information in ./Gemfile
#!/usr/bin/env ruby
require 'ansi/code'
require 'bundler'
require 'json'
require 'open-uri'
class Integer
def to_currency
self.to_s.reverse.gsub(/(\d{3})(?=\d)/, '\1,').reverse
end
@jugyo
jugyo / gist:919046
Created April 14, 2011 07:14
TextMate command to convert CoffeeScript to JavaScript
#!/bin/bash
coffee -scp --bare | sed 's/</\&lt;/g' | sed 's/>/\&gt;/g'
# original: https://github.com/jashkenas/coffee-script-tmbundle/blob/master/Commands/Compile%20and%20Display%20JS.tmCommand
#!/usr/bin/env ruby
#
# A quick script to dump an overview of all the open issues in all my github projects
#
require 'octokit'
require 'awesome_print'
require 'rainbow'
@yashigani
yashigani / MyPickerView.h
Last active June 28, 2017 01:48
MyPickerView
#import <UIKit/UIKit.h>
@interface MyPickerView : UIView
<UIPickerViewDataSource, UIPickerViewDelegate>
{
UIToolbar *toolbar;
UIPickerView *picker;
void (^completion)(NSString *selected);
@monkeydom
monkeydom / CompareMacro.h
Created August 24, 2011 10:33
Objective-C Compare Macro for your convenience
#if !defined(COMPARE)
#define COMPARE(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? NSOrderedAscending : (__a > __b ? NSOrderedDescending : NSOrderedSame); })
#endif