Skip to content

Instantly share code, notes, and snippets.

View tobynet's full-sized avatar

tobynet tobynet

  • Toyama, Japan
View GitHub Profile
@kimoto
kimoto / mizuho_watcher.rb
Created February 19, 2012 05:20
みずほ銀行の口座取引に変化があったらiPhoneに通知する
#!/bin/env ruby
# encoding: utf-8
# Author: kimoto
require 'mizuho_bank'
require 'logger'
require 'kconv'
require 'yaml'
require 'im-kayac'
class Pit::ImKayac
@joseym
joseym / vagrantcheats.sh
Created February 18, 2012 04:47
SSH: Vagrant Aliases
# Vagrant Cheats
# ===========================
alias vup="vagrant up"
alias vh="vagrant halt"
alias vs="vagrant suspend"
alias vr="vagrant resume"
alias vrld="vagrant reload"
alias vssh="vagrant ssh"
alias vstat="vagrant status"
#!/usr/bin/env ruby
%w|ubygems pathname pit erb|.each {|g| require g }
def read_sections
sections = {}
section = nil
DATA.readlines.each do |line|
if line =~ /^@@\s+(.+)/
section = $1
elsif section
@tily
tily / extract_prefix.rb
Created February 13, 2012 14:03
Web ページの本文から【相変わらず女の子からも人気の定番アイテム!】みたいな prefix を抜き出すやつ
# coding: utf-8
#!/usr/bin/env ruby
require 'open-uri'
require 'nokogiri'
# Usage: ruby extract_prefix.rb http://shop.menz-style.com/
# ruby extract_prefix.rb http://hayabusa.2ch.net/news4vip/subback.html
def get_prefix_list(url)
list = []
@tily
tily / generate-party-conversation.rb
Created February 11, 2012 08:04
Twitterの人と飲み会とかで会ったときに話せばいいことを相手に対する favorite のログから生成する
# coding:utf-8
require 'rubygems'
require 'mongo'
include Mongo
# USAGE: ruby generate-party-conversation.rb tily todesking
me, target = ARGV
templates = DATA.read.split("\n")
db = Connection.new.db('twitter')
@taizooo
taizooo / nani_wo_mite_mo_nanika_wo_omoidasu_reloaded.user.js
Created February 10, 2012 09:15
何̄を̫見̷てͨも̫何͔かͩ思̈́い̭出́す リ・リローデッド
// ==UserScript==
// @name nani_wo_mite_mo_nanika_wo_omoidasu_reloaded.user.js
// @namespace http://d.hatena.ne.jp/taizooo/
// @include http://ermos-tily.dotcloud.com/*
// ==/UserScript==
// via http://let.hatelabo.jp/taizooo/let/gYC-xau7z9ONTw
location.href = 'javascript:(' +
function () {
@tily
tily / test.rb
Created February 3, 2012 04:51
変数名をキーにしてハッシュを作る
def args_to_hash(*args)
hash = {}
path, line = caller.first.split(':')
File.open(path) do |f|
(line.to_i-1).times { f.readline }
source = f.readline
args_text = source[/args_to_hash\((.+)\)/, 1]
keys = args_text.gsub(/\s/, "").split(',')
keys.each_with_index do |key, i|
@rummelonp
rummelonp / Gemfile
Created February 1, 2012 09:15
Ruby だけで Twitter Bootstrap コンパイルするやつ
source 'http://rubygems.org'
gem 'less'
gem 'uglifier'
gem 'watchr'
@mislav
mislav / aprompt.png
Last active February 11, 2024 06:40
My zsh prompt. No oh-my-zsh needed
aprompt.png
@gyuque
gyuque / EvilRT.user.js
Created January 24, 2012 14:24 — forked from ssig33/EvilRT.user.js
Google+ の名前のとこを薄くぼかすやつ
// ==UserScript==
// @name EvilRT
// @namespace gyuque
// @include https://plus.google.co*
// ==/UserScript==
/*
This code is available under dual licensing, the MIT license and the
DeNA License.
*/