Skip to content

Instantly share code, notes, and snippets.

View makimoto's full-sized avatar
😪

Shimpei Makimoto makimoto

😪
View GitHub Profile
#!/usr/bin/env ruby
require 'rubygems'
require 'sinatra'
require 'haml'
require 'json'
get '/' do
@title = 'Presentation'
haml :index
end
#!/usr/bin/env ruby
# vim:fileencoding=utf-8
require 'open-uri'
(100...1000).each do |i|
sleep 1
x = open("http://pbh.jp/#{i}/") rescue next
puts i
end
Common subdirectories: elastic-mapreduce-ruby/amazon and elastic-mapreduce-ruby-multiple-jobconf/amazon
diff -cN elastic-mapreduce-ruby/commands.rb elastic-mapreduce-ruby-multiple-jobconf/commands.rb
*** elastic-mapreduce-ruby/commands.rb 2011-02-14 14:35:14.000000000 +0900
--- elastic-mapreduce-ruby-multiple-jobconf/commands.rb 2011-02-23 10:01:37.000000000 +0900
***************
*** 525,531 ****
end
for jc in get_field(:jobconf, []) do
! stream_options << "-jobconf" << jc
// ==UserScript==
// @name kill socialstream
// @namespace http://makimoto.tsuyabu.in/
// @include http://www.ustream.tv/*
// ==/UserScript==
document.getElementsByClassName('socialstream')[0].setAttribute('style','display:none');
@makimoto
makimoto / elastic-mapreduce-ruby-homebrew.patch
Created June 29, 2011 06:28
a patch for elastic-mapreduce-ruby's Homebrew formula
Common subdirectories: elastic-mapreduce-ruby.orig/amazon and elastic-mapreduce-ruby/amazon
Common subdirectories: elastic-mapreduce-ruby.orig/bin and elastic-mapreduce-ruby/bin
diff -c elastic-mapreduce-ruby.orig/elastic-mapreduce elastic-mapreduce-ruby/elastic-mapreduce
*** elastic-mapreduce-ruby.orig/elastic-mapreduce 2011-06-29 15:24:23.000000000 +0900
--- elastic-mapreduce-ruby/elastic-mapreduce 2011-06-29 15:25:00.000000000 +0900
***************
*** 2,8 ****
#
# Copyright 2008-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#!/bin/sh
# set crontab such as:
# 30 6 * * * /bin/sh /path/to/mail_daily_commit_logs.sh
TO='example@example.org'
FROM='example@example.org'
REPO_PATH='/path/to/rails/'
cd $REPO_PATH
/usr/local/bin/git pull
@makimoto
makimoto / Gemfile
Created October 15, 2011 02:42
風早君の存在の有無を返すAPI。
source :rubygems
gem 'sinatra'
@makimoto
makimoto / ねむい
Created December 7, 2011 01:08
ねむい
ねむい
@makimoto
makimoto / jenkins_status_favicon.user.js
Created December 16, 2011 01:30
favicon from Jenkins' status
// ==UserScript==
// @name Jenkins status favicon
// @namespace http://www.xn--n8j4d9b.com/
// @include http://url_to_your_jenkins
// ==/UserScript==
var favicon = document.createElement('link');
favicon.rel = 'shortcut icon';
favicon.type = 'image/gif';
var img = document.getElementsByClassName('icon32x32')[0]
<source>
type http
port 8888
</source>
<match say.**>
type say
</match>