Skip to content

Instantly share code, notes, and snippets.

if process.env.PATH.indexOf('anyenv') == -1
anyenvPath = "#{process.env.HOME}/.anyenv"
if fs.existsSync(anyenvPath)
shims = fs.readdirSync("#{anyenvPath}/envs/").map (file)->
"#{anyenvPath}/envs/#{file}/shims"
.join(":")
process.env.PATH = "#{shims}:#{process.env.PATH}"
@ryumu
ryumu / piyopiyo.rb
Created August 11, 2012 03:40 — forked from ppworks/piyopiyo.rb
PiyoPiyo
class PiyoPiyo
def piyopiyo
puts "piyopiyo"
end
end
@ryumu
ryumu / emoji.rb
Created June 21, 2012 05:05 — forked from jugyo/emoji.rb
gistでいじってからテストするのいくない。
# coding: UTF-8
# emoji plugin
# ====
#
# You can post Emoji easily 😄
#
# Usage
# ----
#
@ryumu
ryumu / nanashi.rb
Created April 23, 2011 08:00
ツイートを全部名無しさんにするearthquake.gemプラグイン。
Earthquake.init do
output_filter do |item|
next unless item['user']
item['user']['screen_name'] = 'nanashi'
end
end
@ryumu
ryumu / aruaru_filter.rb
Created April 12, 2011 05:42
あるあるをフィルターしちゃうearthquake.gemプラグイン
# coding: UTF-8
Earthquake.init do
output_filter do |item|
if item["_stream"] && item["text"]
item["text"] !~ /【.+あるある】/i
else
true
end
end
end
@ryumu
ryumu / screen_name_prompt.rb
Created April 12, 2011 04:02
Earthquake.gemのプロンプトにユーザー名を出すよ!プラグイン
# coding: UTF-8
Earthquake.init do
once do
config[:prompt] = twitter.info['screen_name'] + config[:prompt]
end
end
@ryumu
ryumu / twitpic.rb
Created April 6, 2011 15:03
twitpic earthquake.gem plugin
# coding: UTF-8
# earthquake.gem plugin
# upload image on twitpic
# ====
#
# :twitpic message++/path/to/image
Earthquake.init do
require 'twitpic'
@ryumu
ryumu / bitly.rb
Created April 6, 2011 10:16
shoten url earthquake.gem plugin
# earthquake.gem plugin
# shorten url using bit.ly
Earthquake.init do
_ = config[:bitly] ||= {}
_[:username] ||= ''
_[:api_key] ||= ''
_[:domain] ||= 'j.mp'
_[:only_long_tweet] ||= false