This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'pp' | |
require 'mechanize' | |
class LinkChecker | |
PAGES_MAX = 1000 | |
def initialize(param=[]) | |
@crawled = {} | |
@queue = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'net/imap' | |
require 'kconv' | |
require 'pit' | |
require 'logger' | |
class ImapFetcher | |
def initialize(pit_name) | |
@pit = Pit.get( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import re | |
import yaml | |
if len(sys.argv) != 2: | |
print 'Usage: python %s <mod_name>' % sys.argv[0] | |
quit() | |
mod_name = sys.argv[1] | |
mod = __import__(mod_name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'twitter_oauth' | |
print 'Consumer Key> ' | |
consumer_key = gets.chomp | |
print 'Consumer Secret> ' | |
consumer_secret = gets.chomp | |
t = TwitterOAuth::Client.new( | |
:consumer_key => consumer_key, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# source: http://d.hatena.ne.jp/umezo/20100508/1273332857 | |
local COMMAND="" | |
local COMMAND_TIME="" | |
function precmd() { | |
if [ "$COMMAND_TIME" -ne "0" ] ; then | |
local d=`date +%s` | |
d=`expr $d - $COMMAND_TIME` | |
if [ "$d" -ge "5" ] ; then | |
COMMAND="$COMMAND " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source :gemcutter | |
gem 'pit' | |
gem 'sauberia-aws-s3' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "rubygems" | |
require "benchmark" | |
require "imlib2" | |
N = (ARGV.shift || 1).to_i | |
def bench(title) | |
puts "\nBenchmark: #{title} (#{N} times)" | |
Benchmark.bm(7, ">total:", ">avg:") do |bm| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name AWS Console Activator | |
// @description AWS Console Activator | |
// @match https://console.aws.amazon.com/* | |
// ==/UserScript== | |
(function() { | |
var interval = 1000*60; | |
setInterval(function() {$("#refresh_btn-button").click()}, interval); | |
})(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name DMM Util | |
// @description DMM Utility | |
// @match http://www.dmm.co.jp/* | |
// ==/UserScript== | |
(function() { | |
function replaceImg(img) { | |
var src = img.src | |
img.onload = function(){ | |
img.width = img.naturalWidth; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Chrome Keyconfig", | |
"version": "1.13.1", | |
"normal_actions": { | |
"j": { | |
"name": "scroll down", | |
"args": [] | |
}, | |
"k": { | |
"name": "scroll up", |
OlderNewer