Skip to content

Instantly share code, notes, and snippets.

# -*- coding: utf-8 -*-
# nikkei taisaku plugin
#
# gem install moji
#
# e.g. http://www.google.com/ => http://www.google.com/
#
require 'moji'
Earthquake.init do
@siyo
siyo / nikkei.rb
Last active December 13, 2015 18:08
# -*- coding: utf-8 -*-
# nikkei tweet / earthquake plugin
#
# gem install moji
#
# e.g. :nikkei http://www.google.com/ #=> http://www.google.com/
#
require 'moji'
Earthquake.init do
# -*- coding: utf-8 -*-
Earthquake.init do
command :makahannya do
s = <<EOS
觀自在菩薩。行深般若波羅蜜多時。照見五蘊皆空。度一切苦厄。
舍利子。色不異空。空不異色。色即是空。空即是色。受想行識亦復如是。
舍利子。是諸法空相。不生不滅。不垢不淨不增不減。
是故空中。無色。無受想行識。無眼耳鼻舌身意。無色聲香味觸法。無眼界。乃至無意識界。
無無明。亦無無明盡。乃至無老死。亦無老死盡。無苦集滅道。無智亦無得。
以無所得故。菩提薩埵。依般若波羅蜜多故。心無罣礙。無罣礙故。無有恐怖。遠離顛倒夢想。究竟涅槃。
@siyo
siyo / nero.rb
Last active December 12, 2015 08:29
# -*- coding: utf-8 -*-
# nero plugin
#
# event registration from tweet
# $ 20:31に寝る
# $ 20時半に寝たい
#
require 'time'
Earthquake.init do
@siyo
siyo / okiro.rb
Last active December 12, 2015 08:28
# -*- coding: utf-8 -*-
# okiro plugin
#
# event registration from tweet
# $ 20:00まで寝る
# $ 20:00に起きる
# $ 20:00に起こして
#
require 'time'
@siyo
siyo / teiji.rb
Last active December 12, 2015 05:38
# -*- coding: utf-8 -*-
# teiji tweet / earthquake plugin
#
# src: http://shindanmaker.com/311937
#
require 'httpclient'
Earthquake.init do
command %r|^:teiji\s*(.+)?|, :as => :teiji do |m|
url = "http://shindanmaker.com/311937"
@siyo
siyo / honki_dase.rb
Last active December 12, 2015 02:09
# -*- coding: utf-8 -*-
# honki dase plugin
#
# e.g.:
# event registration from tweet
# $ 20:00に本気だす
#
require 'time'
Earthquake.init do
@siyo
siyo / boxer.rb
Last active December 10, 2015 15:08
# -*- coding: utf-8 -*-
# boxer tweet
#
# e.g. :boxer $aa => hoge (^ω゚(o-('-'o イェイ!
# :boxer user => foo (^ω゚(6('-'o)
#
class String
def punch
arms = ["=≡-","-","-=≡","≡","=","~"]
lface = ["(o'-')","o'-')","イェイ! o'-')"].sample
@siyo
siyo / favstar.rb
Last active October 11, 2015 13:18 — forked from morygonzalez/favstar.rb
favstar ふぁぼったりRTしたユーザ名も見るやつ(色つき + 発見) / earthquakge.gem plugin
# -*- coding: utf-8 -*-
# favstar / earthquakge.gem plugin
#
# option:
# -d : discovered
#
# e.g. :favstar #=> your favstar
# :favstar who #=> who's favstar
# :favstar -d #=> your discovered favstar
# :favstar -d who #=> who's dicovered favstar
@siyo
siyo / rs232c.c
Created August 5, 2012 15:37
糞rs232c
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <termios.h>
#include <unistd.h>
int main( void )
{