Skip to content

Instantly share code, notes, and snippets.

@osa9
osa9 / GrowlRegist.scpt
Created February 5, 2011 13:00
Apple MailでTwitterのフォロー通知メールが届いた時にGrowlで通知
(* Growlにアプリケーションを登録 *)
tell application "GrowlHelperApp"
register as application ¬
"TWMailGrowl" all notifications {"Notification", "Notification2"} ¬
default notifications {"Notification"} ¬
icon of application "Script Editor"
end tell
@osa9
osa9 / RegistGrowl.scpt
Created February 5, 2011 13:08
Growlにアプリケーションを登録
tell application "GrowlHelperApp"
register as application ¬
"TWMailGrowl" all notifications {"Notification", "Notification2"} ¬
default notifications {"Notification"} ¬
icon of application "Script Editor"
end tell
@osa9
osa9 / Main.hs
Created March 19, 2011 01:36
Haddock
-- Main module
-- * This is Main module
-- * This comment cause haddock parse error
module Main(main) where
main = print "hello world!"
@osa9
osa9 / Main.java
Created August 27, 2011 02:39
オブジェクト指向で遊んでみる
//---------------------------------------
// オブジェクト指向で遊んでみる
//---------------------------------------
//---------------------------------------
// 補助クラス
//---------------------------------------
// Void型
@osa9
osa9 / .vimperatorrc
Created June 25, 2012 19:49
VimperatorのヒントからReadabilityの記事の削除
" add Readability hints
js <<EOM
hints.addMode('d', 'delete article', function(elem) {
elem.getElementsByClassName('article-confirmDelete')[0].click();
}, function() '//*[contains(@class,"article-box")]');
EOM
" ,rlとかと統一性を持たせたい
nnoremap ,rd ;d
" Readability delete article hint mode
js <<EOM
hints.addMode('d', 'delete article', function(elem) {
elem.getElementsByClassName('article-confirmDelete')[0].click();
elem.getElementsByClassName('article-remove')[0].click();
}, function() '//*[contains(@class,"article-box")]');
EOM
nnoremap ,rd ;d
@osa9
osa9 / twitter.rb
Created January 8, 2013 02:37
in C program system("ruby twitter.rb hoge");
require 'twitter'
Twitter.configure do |config|
config.consumer_key = YOUR_CONSUMER_KEY
config.consumer_secret = YOUR_CONSUMER_SECRET
config.oauth_token = YOUR_OAUTH_TOKEN
config.oauth_token_secret = YOUR_OAUTH_TOKEN_SECRET
end
Twitter.update(ARGV[0])