Skip to content

Instantly share code, notes, and snippets.

@siyo
siyo / index.html
Last active August 29, 2015 14:02
zanzou-ken cam
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<style type="text/css">
body {
Background: #222;
}
!/usr/bin/env ruby
# -*- coding: utf-8 -*-
# これが何を意味するのかわかる人だけ使ってください
#--
time = Time.now
today = "%04d%02d%02d" % [time.year, time.month , time.day]
REJECT_EXTENTIONS = ["html","url"]
if not (FileTest.exist?(today) or FileTest.directory?(today))
mkdir = "mkdir %s" % today
@siyo
siyo / .tw
Created December 7, 2010 17:05
oreore twitter cli client
#
# this file format is YAML
#
acount_basic:
screen_name1:
user: screen_name1
password: password1
screen_name2:
user: screen_name2
password: password2
@siyo
siyo / itunescli.rb
Created December 18, 2010 17:34
my itunes cli
#!/usr/bin/env ruby
require 'kconv'
require 'rubygems'
require 'rbosa'
class ItunesCLI
COMMANDS = {
'next' => :next_track,
'n' => :next_track,
バタリ
シュワリ
ゴクリ
フロア
フロハ
@siyo
siyo / event_notifier_plus.rb
Created October 10, 2011 02:18
earthquake.gem plugin: fav and follow events growl notifer
# -*- coding: utf-8 -*-
# event_notifer+ plugin
#
require "fileutils"
require "digest/md5"
Earthquake.init do
dir = File.join(File.dirname(__FILE__), "userimage")
output do |item|
if item["event"] && item["source"]["screen_name"] != twitter.info["screen_name"]
@siyo
siyo / reply_rt_notifier.rb
Created October 10, 2011 02:23
earthquake.gem plugin: reply and RT growl notifer
# -*- coding: utf-8 -*-
# reply_rt_notifier plugin
#
require "fileutils"
require "digest/md5"
Earthquake.init do
dir = File.join(File.dirname(__FILE__), "userimage")
output do |item|
@siyo
siyo / jisin_sokuhou.rb
Created October 10, 2011 04:17
@eew_jp 氏をgrowlするearthquake.gem plugin
# -*- coding: utf-8 -*-
# kinkyuu jisin sokuhou (@eew_jp) earthguake.gem plugin
#
require "fileutils"
require "digest/md5"
Earthquake.init do
dir = File.join(File.dirname(__FILE__), "userimage")
output do |item|
@siyo
siyo / dice_tweet.rb
Created October 11, 2011 17:02
サイコロ降ってtweet / earthquake.gem plugin
# dice tweet / earthquake plugin
#
# e.g. :d100 # update 'D100 = 47' [Yn]
# :10D567 # update '10D567 = 2992' [Yn]
# :3d100 $xx # update '@who 3D100 = 239' [Yn]
#
Earthquake.init do
command %r|^:(\d*)([dD])(\d+)\s*(\d+)*$|, :as => :dice do |m|
t = m[1] == "" ? 1 : m[1].to_i
c = m[4] ? ":reply #{m[4]}" : ":update"
@siyo
siyo / haiku_tweet.rb
Created October 11, 2011 20:23
俳句が読みたくなった時用earthquake plugin
# -*- coding: utf-8 -*-
# haiku tweet / earthquake plugin
#
# e.g. :haiku # => ここで一句、柿食えば 鐘がなるなり 法隆寺
# :haiku hoge # => hoge ここで一句、柿食えば 鐘がなるなり 法隆寺
# :haiku $xx # => @who ここで一句、柿食えば 鐘がなるなり 法隆寺
# :haiku $xx hoge # => @who hoge ここで一句、柿食えば 鐘がなるなり 法隆寺
#
Earthquake.init do
command %r|^:haiku\s*(\d+)*\s*(.*)$|, :as => :haiku do |m|