I hereby claim:
- I am hmsk on github.
- I am hmsk (https://keybase.io/hmsk) on keybase.
- I have a public key whose fingerprint is 2F06 25F6 2AC5 3F32 B45C C423 C5EF 0A6A 7C59 4925
To claim this, I am signing this object:
{ | |
"error": { | |
"type": "card_error", | |
"message": "The system is so busy. Please wait for a while to try it again.", | |
"code": "processing_error" | |
} | |
} |
require 'open-uri' | |
require 'json' | |
body = open('http://www3.nhk.or.jp/news/easy/news-list.json', "r:utf-8").read.gsub("\xEF\xBB\xBF", '') | |
begin | |
json = JSON.parse(body) | |
p json | |
rescue JSON::ParserError => e | |
puts e.message |
#!/usr/local/bin/ruby | |
ARGV.each do |f| | |
read_size = 0 | |
io = File.open f | |
print "#{f} :\n" | |
while (s = io.sysread(32768) rescue nil) do | |
read_size += s.size | |
STDERR.print "#{read_size} bytes read \r" | |
end |
I hereby claim:
To claim this, I am signing this object:
require 'formula' | |
class Varnish3 <Formula | |
url 'http://repo.varnish-cache.org/source/varnish-3.0.0-beta2.tar.gz' | |
homepage 'http://www.varnish-cache.org/' | |
md5 '26b6c5f57b1a2a736503a225a4d911cc' | |
depends_on 'pkg-config' => :build | |
depends_on 'pcre' => :build |
public abstract class BaseActivity extends SherlockFragmentActivity { | |
private static final String SKU_PREMIUM = "Developer Consoleで設定したproduct id"; | |
private static final int REQUEST_CODE_PURCHASE_PREMIUM = よしなにリクエストコードを; | |
private static final String BILLING_PUBLIC_KEY = "Developer Consoleで得られるBase64encodedな公開鍵(そのままコードに持たせず別の形からデコードなりして持ってくるのが推奨されている"; | |
private IabHelper mBillingHelper; | |
private boolean mIsPremium = false; | |
@Override |
git push heroku `git subtree split --prefix website master`:master --force |
# coding: utf-8 | |
# ref: http://sho.tdiary.net/20131128.html | |
require 'pry' | |
require 'webpay' | |
require 'singleton' | |
module WebPayConsole | |
class ObjectRepository |
robot.router.post '/hubot/an-endpoint', (req, res) -> | |
payload = req.body || { recipient: null } | |
unless payload.recipient == 'my-mailgun@email-address' | |
res.writeHead(403) | |
res.end() | |
return | |
res.writeHead(204) | |
res.end() | |
att = |
#!/bin/sh | |
_git_rebase_on_current_branch() | |
{ | |
# https://gist.github.com/joechrysler/6073741 | |
branch=`git rev-parse --abbrev-ref HEAD` | |
parent_branch=`git show-branch -a 2>/dev/null | grep '\*' | grep -v "$branch" | head -n1 | sed 's/.*\[\(.*\)\].*/\1/' | sed 's/[\^~].*//'` | |
latest_parent_commit=`git merge-base $parent_branch HEAD` | |
echo Run rebase interactive editor for commits after $latest_parent_commit | |
git rebase -i $latest_parent_commit |