Skip to content

Instantly share code, notes, and snippets.

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

Kazuya Takeshima rummelonp

🐈‍⬛
ニャーン
View GitHub Profile
<script src="jquery.min.js" type="text/javascript"></script>
<script src="jquery.enumerable.js" type="text/javascript"></script>
@rummelonp
rummelonp / oauth.yml
Created March 29, 2011 03:58
Userstreamからふぁぼられとかを監視とかしてGrowlとかするかもしれないRubyスクリプト
---
:consumer_key: consumer_key
:consumer_secret: consumer_secret
:oauth_token: oauth_token
:oauth_token_secret: oauth_token_secret
@rummelonp
rummelonp / .boxcar.yml
Created April 3, 2011 05:16
コマンドラインから簡単にBoxcarにメッセージを送信するためのRubyスクリプト
---
:email: [email protected]
:password: password
=begin
必要なもの
$ gem install rubytter
../oauth_yaml/#{Client}-#{App}.yaml ( TwitterOAuthの情報を格納したもの )
これはなに
指定したscreen_nameのfollowingの色んな変更をチェックする感じ。
つかいかた
=begin
必要なもの
$ gem install rubytter
../oauth_yaml/#{Client}-#{App}.yaml ( TwitterOAuthの情報を格納したもの )
最初の方に定義してある定数をちょこちょこ書き換えるスキル
これはなに
指定した人の最新200件のtweetを取得して、既にふぁぼってるの以外をふぁぼります。
このscriptでふぁぼったものだけを #{@screen_name}-favterro-#{日付}.yaml に書き出すので、簡単にリセットできます。
@rummelonp
rummelonp / tw_to_tmbr.rb
Created April 10, 2011 16:20
TwitterのRSSからTumblrにQuoteを投稿するRubyスクリプト
# -*- coding: utf-8 -*-
## tw_to_tmbr is the script that to post quote to tumblr from twitter rss feed.
##
## requirements:
## tumblr (gem install tumblr-rb)
##
require 'rubygems'
require 'tumblr'
require 'open-uri'
@rummelonp
rummelonp / std_class_to_array.php
Created April 13, 2011 06:38
stdClassを連想配列に変換する程度の関数
<?php
function stdClassToArray($obj)
{
if (!is_object($obj) && !is_array($obj)) {
return $obj;
}
$arr = (array)$obj;
foreach ($arr as $key => $value) {
@rummelonp
rummelonp / adb_all.rb
Created April 20, 2011 01:19
繋いでる全てのAndroid端末に同じコマンド送る
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
ANDROID_TOOLS = '/Applications/android-sdk-mac_86/platform-tools'
devices_info = `#{ANDROID_TOOLS}/adb devices`
devices = devices_info.split("\n").map {|line| line.split(' ').map.first}[1..-1]
args = ARGV.join(' ')
devices.each do |device|
@rummelonp
rummelonp / twitter_search.rb
Created April 21, 2011 14:09
SinatraとRubytterとHamlでTwitter検索
# -*- coding: utf-8 -*-
##
## requirements
## sinatra
## rubytter
## haml
## install
## $ gem install sinatra rubytter haml
## usage
## $ ruby twitter_search.rb
@rummelonp
rummelonp / cocproxy.nginx.conf
Created May 26, 2011 01:46 — forked from hotchpotch/cocproxy.nginx.conf
cocproxy for nginx
#!nginx -p . -c cocproxy.nginx.conf
error_log /dev/stderr debug;
daemon off;
events {
worker_connections 48;
}
http {