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
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.2.min.js"></script> | |
<script type="text/javascript"> | |
!(function($, window){ | |
$(document).ready(function(){ | |
$(window).on("message", receiveMessage); | |
function receiveMessage(event){ | |
// アンケート完了後にメッセージが通知されます | |
// こちらを拾っていただくことで任意のページに移動可能です | |
if( event.originalEvent.data == "complete" ){ |
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
$ brew install pyenv | |
$ echo 'eval "$(pyenv init -)"' >> ~/.bash_profile | |
$ source ~/.bash_profile | |
$ pyenv install 2.7.6 | |
$ pyenv global 2.7.6 |
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 | |
# | |
# nginx - this script starts and stops the nginx daemon | |
# | |
# chkconfig: - 85 15 | |
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \ | |
# proxy and IMAP/POP3 proxy server | |
# processname: nginx | |
# config: /usr/local/nginx/conf/nginx.conf | |
# config: /etc/sysconfig/nginx |
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
source 'https://rubygems.org' | |
gem 'rails', '3.2.21' | |
gem 'mysql2', '0.3.11' | |
gem 'aws-sdk', '1.8.5' | |
gem 'stripe', '1.10.0' | |
gem 'gibbon', '1.1.3' | |
gem 'logan', '0.0.4' |
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
class Hoge | |
class << self | |
def of(key) | |
@cache ||= {} | |
@cache[key] ||= new(key) | |
end | |
def dispose | |
@cache = {} | |
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
require "rubygems" | |
require "google/api_client" | |
require 'google_drive' | |
module CreativeSurvey | |
module Google | |
module Authorify | |
module ModuleMethods | |
def session | |
::GoogleDrive.login_with_oauth(refreshed_auth.access_token) |
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
class SomeModel | |
def some_method | |
some_method2 'hello' | |
end | |
def some_method2(str) | |
fail TypeError, 'The argument must be String' unless str.is_a? String | |
true | |
end | |
alias_method :some_method3, :some_method2 |
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
def hoge | |
11 | |
fail StandardError | |
rescue | |
ensure | |
33 | |
end | |
def fuga |
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
北海道 | |
青森県 | |
岩手県 | |
宮城県 | |
秋田県 | |
山形県 | |
福島県 | |
茨城県 | |
栃木県 | |
群馬県 |
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
aemonize yes | |
pidfile /var/run/redis.pid | |
port 6379 | |
tcp-backlog 511 | |
timeout 0 | |
tcp-keepalive 0 | |
loglevel notice | |
logfile /var/log/redis.log | |
databases 16 | |
save 900 1 |