Skip to content

Instantly share code, notes, and snippets.

@hagiyaki
hagiyaki / juniper-mib-renamer.sh
Created April 15, 2014 16:18
引数ディレクトリのmibリネームするやつ
#!/bin/bash
for f in `ls $1/*.txt`
do
name=`grep "DEFINITIONS" $f|grep "BEGIN"|sed -e 's/^[ \t]*//g'|cut -f1 -d" "`
mv $f $1/$name.mib
done
@hagiyaki
hagiyaki / kusony.user.js
Created September 18, 2013 12:48
日本だけ遅いのクソ
// ==UserScript==
// @name sony kuso
// @version 0.1
// @description ソニー倒産してくれ頼む
// @include *
// ==/UserScript==
document.body.innerHTML = document.body.innerHTML.replace(/(PS\s*4|PlayStation\s*4|プレステ\s*4|プレイステーション\s*4)/g, '日本だけ発売が遅い$1')
@hagiyaki
hagiyaki / kenjisky.rb
Created June 14, 2013 11:26
ケンジィスゥカァイウォォカァァァ
# -*- coding: utf-8 -*-
# kenjiskaywalker tweet / earthquake plugin
#
# superdry: http://shindanmaker.com/43570
#
require 'httpclient'
require 'nokogiri'
Earthquake.init do
command :kenji do
@hagiyaki
hagiyaki / hagidry.rb
Created June 13, 2013 16:31
hagiyakiスーパードラァイ
# -*- coding: utf-8 -*-
# hagiyakisuperdry tweet / earthquake plugin
#
# superdry: http://shindanmaker.com/43570
#
require 'httpclient'
require 'nokogiri'
Earthquake.init do
command :hagi do
@hagiyaki
hagiyaki / fukkatsu.sh
Created April 24, 2013 07:16
earthquake監視マン
while true
do
CHK_PROC=`ps aux|grep earthquake|grep -v grep|wc -l`
if [ ${CHK_PROC} -eq 0 ]; then
gnome-terminal -e earthquake
sleep 2
fi
done
@hagiyaki
hagiyaki / trans.rb
Created February 27, 2012 08:02
翻訳してツイートするearthquake.gem plugin(MSのappidいる)
# -*- coding: utf-8 -*-
# trans tweet / earthquake plugin
# e.g. :trans おはよう => Good morning
# :trans fr おはよう => Bonjour
# 使えるらしい言語
# ar bg zh-CHS zh-CHT cs da nl en et fi fr de el ht he
# hu id it ja ko lv lt no pl pt ro ru sk sl es sv th tr uk vi
#
# appid取得 http://www.bing.com/developers/appids.aspx
#
@hagiyaki
hagiyaki / cola.rb
Created February 17, 2012 14:38 — forked from siyo/beer.rb
コーラ飲んでる時用earthquake.gem plugin
# -*- coding: utf-8 -*-
# cola tweet / earthquake plugin
#
# e.g. :cola うまい #=> コうまいーラ
#
Earthquake.init do
command :cola do |m|
input(":update コ#{m[1]}ーラ")
end
end
@hagiyaki
hagiyaki / gyaku.rb
Created January 21, 2012 16:50 — forked from siyo/reverse.rb
ひっくり返してtweetするやつ/ earthquake.gem plugin
# -*- coding: utf-8 -*-
# gyaku tweet
#
# e.g. :gyaku hoge => egoh
# reverseと一緒にしたいけどスキルなくて無理だったおversion
Earthquake.init do
command %r|^:gyaku\s*(\d+)*\s+(.+)$|, :as => :gyaku do |m|
text = m[2]
input text.split(//).reverse.join
end
@hagiyaki
hagiyaki / asahibyun.rb
Created January 19, 2012 17:16
byunしながらスーパードライ earthquake.gem plugin
# -*- coding: utf-8 -*-
# superdry tweet / earthquake plugin
#
# superdry: http://shindanmaker.com/43570
#
require 'httpclient'
Earthquake.init do
command :byunasahi do
url = "http://shindanmaker.com/43570"
@hagiyaki
hagiyaki / ogyoheebyun.rb
Created January 19, 2012 17:11 — forked from DOGEME/ogyohee.rb
byunしながらオギョヒーっていう時用 / earthquake.gem plugin
# -*- coding: utf-8 -*-
# ogyohee tweet / earthquake plugin
#
# ogyohee: http://shindanmaker.com/152454
#
require 'httpclient'
Earthquake.init do
command :byunogyo do
url = "http://shindanmaker.com/152454"