Skip to content

Instantly share code, notes, and snippets.

View rummelonp's full-sized avatar
🐈‍⬛
ニャーン

Kazuya Takeshima rummelonp

🐈‍⬛
ニャーン
View GitHub Profile
@rummelonp
rummelonp / ggrks
Created September 19, 2010 11:09
#!/usr/bin/ruby -Ku
args = ARGV
if args.length == 0
puts "Usage: ggrks [-n num] [-p page] [query]"
puts "Try `gglks --help' for more information."
exit
end
;; add .emacs to load path
(add-to-list 'load-path "~/.emacs.d")
(add-to-list 'load-path "~/.emacs.d/elisp")
;; language
(set-language-environment "Japanese")
(prefer-coding-system 'utf-8)
(setq file-name-coding-system 'utf-8)
(setq locale-coding-system 'utf-8)
javascript:var e,i=0,d=document,r=d.evaluate("//text()",d,null,7,null);for(;i<r.snapshotLength;i++){e=r.snapshotItem(i);e.nodeValue=e.nodeValue.replace(/(fb|facebook|フェイスブック)/gi,'Tumblr');}void(0);
// ==UserScript==
// @name Twitter add RT button for new UI
// @namespace http://mitukiii.jp/
// @description TwitterのWebクライアントに非公式のRTボタンを追加するスクリプト
// @include http://twitter.com/*
// @include https://twitter.com/*
// ==/UserScript==
(function() {
// 1. RT @mitukiii: ほげほげぴよぴよツイート
@rummelonp
rummelonp / TLPostParser.cs
Created October 18, 2010 00:12
Tumblifeのパース処理の各言語間の比較
using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
;; share clipboard for max os x
(if (string-equal system-configuration "mac-apple-darwin")
(progn
(defun copy-from-osx ()
(shell-command-to-string "pbpaste"))
(defun paste-to-osx (text &optional push)
(let ((process-connection-type nil))
(let ((proc (start-process "pbcopy" "*Messages*" "pbcopy")))
(process-send-string proc text)
(process-send-eof proc))))
require 'rubygems'
require 'rubytter'
require 'parsedate'
oauth = YAML.load_file("#{File.dirname(File.expand_path(__FILE__))}/#{oauth.yaml}")
consumer = OAuth::Consumer.new(oauth[:consumer_key], oauth[:consumer_secret], :site => "http://twitter.com")
token = OAuth::AccessToken.new(consumer, oauth[:oauth_token], oauth[:oauth_token_secret])
t = OAuthRubytter.new(token)
page = 1
@rummelonp
rummelonp / init.el
Created October 24, 2010 06:10
現在の.emacsさん
;; add .emacs to load path
(add-to-list 'load-path "~/.emacs.d")
(add-to-list 'load-path "~/.emacs.d/elisp")
;; language and coding
(set-language-environment "Japanese")
(prefer-coding-system 'utf-8)
(setq file-name-coding-system 'utf-8)
(setq locale-coding-system 'utf-8)
@rummelonp
rummelonp / init.el
Created October 28, 2010 04:00
twittering-modeでreply/directmessageが来たときにgrowlを出す設定
;; growl
(setq growl-program "/usr/local/bin/growlnotify")
(defun growl (title message &optional app)
(start-process "Growl" "*Growl*" growl-program
"-t" title
"-m" message
"-a" app))
;; twittering mode
(require 'twittering-mode)
@rummelonp
rummelonp / .profile
Created October 28, 2010 17:32
現在の.profileさん
# MacPorts
export PATH="$PATH:/opt/local/bin:/opt/local/sbin"
# Android
ANDROID_HOME="/Applications/android-sdk-mac_86"
export PATH="$PATH:${ANDROID_HOME}/tools"
# Ruby Version Manager
if [ -f $HOME/.rvm/scripts/rvm ]; then
source $HOME/.rvm/scripts/rvm