Skip to content

Instantly share code, notes, and snippets.

View katsuma's full-sized avatar
🏠
Working from home

ryo katsuma katsuma

🏠
Working from home
View GitHub Profile
@katsuma
katsuma / .zshrc
Created December 10, 2011 17:20
my latest .zshrc
#
# after edit this file, type "zcompile .zshrc"
#
export LANG=ja_JP.UTF-8
HISTFILE=$HOME/.zsh-history
HISTSIZE=100000
SAVEHIST=100000
WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
@katsuma
katsuma / gist:1393561
Created November 25, 2011 13:42
Hello world!
puts "hello world!"
@katsuma
katsuma / gist:1380680
Created November 20, 2011 18:44
rb-appscript testing
require 'appscript'
include Appscript
its = app "iTunes.app"
# プレイリストの作成
# playlist = its.make(:new => :user_playlist, :with_properties => {:name => "test"})
# ファイルの追加(プレイリスト指定して追加)
#org_track = its.add(MacTypes::FileURL.path(File.expand_path("/path/to/foo.wav")), :to => playlist)
@katsuma
katsuma / .screenrc
Created November 13, 2011 16:57
latest .screenrc
## エスケープキーの設定
escape ^Tt
## ビジュアルベルを無効
vbell off
## ステータス行の設定
hardstatus alwayslastline "[%02c] %`%-w%{=b bw}%n %t%{-}%+w"
## スタートアップ時メッセージ無効
@katsuma
katsuma / gist:1354145
Created November 10, 2011 04:52
init.el
;; 行末のホワイトスペースを表示
(when (boundp 'show-trailing-whitespace) (setq-default
show-trailing-whitespace t))
(set-face-background 'trailing-whitespace "plum")
@katsuma
katsuma / i
Created November 8, 2011 18:25
Get IP address and set it to clipboard
ifconfig en1 | grep netmask | awk '{ print $2 }' | pbcopy && pbpaste
framework 'Cocoa'
require 'rubygems'
require 'hotcocoa'
class Application
include HotCocoa
def start
application(:name => "Postie") do |app|
// ==UserScript==
// @name LikeEverywhereAtBottom
// @namespace http://blog.katsuma.tv/
// @include http://*
// @include https://*
// ==/UserScript==
(function (){
if(unsafeWindow.self != unsafeWindow.top){
return;
require 'rubygems'
require 'benchmark'
require 'memcache'
require 'tokyocabinet'
require 'tokyotyrant'
require 'redis'
include TokyoCabinet
include TokyoTyrant