def in_app_purchase signature, receipt_data, base64_encoded_public_key
public_key = OpenSSL::PKey::RSA.new(base64_encoded_public_key)
if public_key.verify(OpenSSL::Digest::SHA1.new, Base64.decode64(signature), receipt_data)
# Success
else
# Failure
end
end
This file contains 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
# Custom Keymap for RubyMine (by fxn) | |
The keymap I work with, inspired by my past Emacs years, these are configurable | |
in Preferences -> Keymap. | |
Most of these have no conflict with the existing shortcuts, I use the default | |
keymap for Mac OS X and add these ones (an action can have several shortcuts). | |
To configure two strokes enter the first one in the main textfield (eg, C-g), | |
check "Second Stroke" and the second one there (eg, c). |
- メインスピーカー:マシューさん(@matthewmccull)
- サブスピーカー:ジョンさん(@johndbritton)
従来の CVCS (集中バージョン管理システム)のリビジョン番号は連番。 SVN はサーバーにデプロイした時点でリビジョン番号1と設定される。
This file contains 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
use 5.14.0; | |
use Plack::Request; | |
use IO::Handle; | |
use Encode; | |
use List::Util qw/sum/; | |
use POSIX qw/strftime/; | |
use JSON::XS; | |
my $json_encoder = JSON::XS->new->latin1; | |
my $json_decoder = JSON::XS->new->utf8; |
This file contains 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
http://jsfiddle.net/GuQaV/show/ |
This file contains 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 'rspec' | |
# This smells | |
[[ 1, 2, 3], | |
[ 4, 8, 12], | |
[-2, 3, 1], | |
[ 0, 0, 0]].each do |a, b, c| | |
describe "#{a} + #{b}" do | |
subject { a + b } | |
it { should == c } |
This file contains 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
use strict; | |
use warnings; | |
use 5.017; | |
use utf8; | |
use B; | |
use Encode; | |
{ | |
sub MODIFY_CODE_ATTRIBUTES { |
原文:Scaling Isomorphic Javascript Code (This is just for study, please contact me at tily05 atmark gmail.com if any problem.)
考えてみれば Model-View-Controller とか MVC ってよく聞くよね。実際どんなものか知ってる? 抽象的に言うなら「オブジェクト情報の保持されるグラフィック・システム (つまり、ラスターではないグラフィック。ゲームとか) 上に構築された、表示系を中心としたアプリケーションにおいて、主要な機能どうしの関わりをうまく分離すること」とでも言おうか。もう少し深く考えを押し進めてみれば、これは当然、他のさまざまなアプリケーションにもあてはまる言葉 (bucket term ?) だ。
過去に多くの開発コミュニティが MVC による解決案を提供し、それによってよくあるユースケースにうまく対処し、地位を築くことができた。例をあげるなら、Ruby や Python コミュニティは Rails や Django を作り、MVC アーキテクチャを実現した。
This file contains 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
#!/bin/sh | |
set -u | |
set -e | |
# Example init script, this can be used with nginx, too, | |
# since nginx and unicorn accept the same signals | |
# Feel free to change any of the following variables for your app: | |
APP_ROOT=/home/deploy/public_html/rm/current | |
PID=$APP_ROOT/tmp/pids/unicorn.pid | |
ENV=production |
This file contains 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
#!/usr/bin/env perl | |
=head1 NAME | |
idezawaman.pl - | |
=head1 WHY THIS NAME? | |
16:24 < Yappo> ちょっとしたツールかきたいのに良い名前が思い浮かばなくてかけてない | |
16:28 < teranishi> まかせなさい |