Skip to content

Instantly share code, notes, and snippets.

View suchi's full-sized avatar
👨‍💼

suchi suchi

👨‍💼
View GitHub Profile
@suchi
suchi / ipad2_alive.rb
Created April 27, 2011 09:27 — forked from mackato/ipad2_check.rb
iPad2を待ちながら
require 'open-uri'
WAIT = 180
loop do
begin
open('http://onlineshop.mb.softbank.jp/ols/html/model/ipad/')
puts "iPad2 online shop page opened!"
rescue Exception => e
unless e.to_s =~ /^403/
puts "iPad2 online shop status changed #{e}"
end
@suchi
suchi / mongrel.rb
Created June 14, 2011 13:30 — forked from metaskills/mongrel.rb
Redmine 1.2.0 + Mongrel 1.1.5の不具合対応
if ['2.3.8', '2.3.9', '2.3.10', '2.3.11'].include?(Rails.version) && Gem.available?('mongrel', Gem::Requirement.new('~>1.1.5')) && self.class.const_defined?(:Mongrel)
# Pulled right from latest rack. Old looked like this in 1.1.0 version.
#
# def [](k)
# super(@names[k] ||= @names[k.downcase])
# end
#
module Rack
module Utils
@suchi
suchi / 0_reuse_code.js
Created March 20, 2014 11:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@suchi
suchi / amazon-calc.js
Created January 4, 2019 01:47 — forked from koyopro/amazon-calc.js
Amazonで一年間に使った金額と、注文履歴のTSVを出力するブックマークレット【2015年版】
// Amazonの注文履歴をTSV形式で出力するスクリプト
//
// 2015-01-01 時点での DOM 構造に対応, GoogleCrome, Opera でテスト済。
// formatEntry関数を書き換えれば自由な書式で出力できます。
//
// 参考:
// - Amazonの注文履歴をCSV形式にして出力するスクリプト
// https://gist.github.com/arcatdmz/8500521
// - Amazon で使った金額の合計を出す奴 (2014 年バージョン)
// https://gist.github.com/polamjag/866a8af775c44b3c1a6d
#!/usr/bin/env ruby
file = File.open("index.html", "r:iso-2022-jp:UTF-8")
content = file.read
all_html = <<HTML
<html>
<head>
<meta http-requiv="Content-Type" content="text/html;charset=utf-8">
<meta name="Author" content="Aoki Minero">