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:
| #!/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 |
| 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 = |
I hereby claim:
To claim this, I am signing this object:
| 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 |
| { | |
| "error": { | |
| "type": "card_error", | |
| "message": "The system is so busy. Please wait for a while to try it again.", | |
| "code": "processing_error" | |
| } | |
| } |
| # coding: utf-8 | |
| # ref: http://sho.tdiary.net/20131128.html | |
| require 'pry' | |
| require 'webpay' | |
| require 'singleton' | |
| module WebPayConsole | |
| class ObjectRepository |
| get '/' do | |
| content_type 'text/xml' | |
| Twilio::TwiML::Response.new do |r| | |
| r.Play WELCOME_MESSAGE_FILE | |
| r.Redirect '/record', method: 'get' | |
| end.text | |
| end | |
| get '/record' do | |
| content_type 'text/xml' |
| git push heroku `git subtree split --prefix website master`:master --force |
| 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 |
| 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 |