mkdir foo
cd foo
curl -o "Vagrantfile" "https://gist.githubusercontent.com/masuidrive/20049711692b5f5885c8/raw/171c5027732476f433b6cb97963382e3896fada0/Vagrantfile"
vagrant up && vagrant ssh
# 以下、vagrant内
cd /vagrant
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
# rubocop:disable Style/HashSyntax | |
# shoryuken用のタスク | |
namespace :queues do | |
desc 'Create default SNS & SQS' | |
task 'setup' => :environment do | |
# http://qiita.com/takeyuweb/items/cdc262d97c3e863c15ff | |
# TODO | |
end | |
desc "List all SQS queues" |
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
/** | |
* Google Spreadsheet向けBigQuery取り込みスクリプト | |
* http://toreta.blog.jp/archives/20649904.html | |
* License: MIT 2014- Toreta, Inc. | |
* | |
* runAllQueries() をトリガーで毎日実行してください | |
* Queries, Single row queries, Dataの三つのシートを作って下さい | |
* Queries, Single row queriesのシートには実行するクエリを書きます | |
* A列にクエリ名、B列にクエリです。 | |
* conuntなどの集約関数で1行しか返らないクエリは「Single row queries」、それ以外は「Queries」に書いて下さい |
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/bash | |
protected_branch='develop' | |
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
if [ $protected_branch = $current_branch ] | |
then | |
read -p "You're about to push $protected_branch, is that what you intended? [y/N] " -n 1 -r < /dev/tty | |
echo | |
if echo $REPLY | grep -E '^[Yy]$' > /dev/null |
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
module RenderFilter | |
extend ActiveSupport::Concern | |
included do | |
define_callbacks :process_render | |
end | |
public | |
def render(*args) | |
run_callbacks :process_render do |
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
wu24 | 24.345703125 | 123.92578125 | 沖縄県 | 八重山郡 | 竹富町 | 47381 | ||
---|---|---|---|---|---|---|---|---|
wudv | 26.279296875 | 127.79296875 | 沖縄県 | 中頭郡 | 中城村 | 47328 | ||
wuep | 26.630859375 | 128.14453125 | 沖縄県 | 国頭郡 | 東村 | 47303 | ||
wvh1 | 28.388671875 | 129.55078125 | 鹿児島県 | 奄美市 | 46222 | |||
wvku | 30.322265625 | 130.60546875 | 鹿児島県 | 熊毛郡 | 屋久島町 | 46505 | ||
wvmj | 30.498046875 | 130.95703125 | 鹿児島県 | 熊毛郡 | 中種子町 | 46501 | ||
wvmn | 30.673828125 | 130.95703125 | 鹿児島県 | 西之表市 | 46213 | |||
wvsc | 31.201171875 | 130.60546875 | 鹿児島県 | 指宿市 | 46210 | |||
wvt1 | 31.201171875 | 130.95703125 | 鹿児島県 | 肝属郡 | 肝付町 | 46492 | ||
wvsd | 31.376953125 | 130.25390625 | 鹿児島県 | 南さつま市 | 46220 |
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
// 取得するJSONのURL | |
var url = "http://api.openweathermap.org/data/2.5/weather?lat=35.65858&lon=139.745433"; | |
// データを保存するシート | |
var data_sheet_name = 'data'; | |
// アップデートするチャートの名前 | |
var chart_sheet_name = 'charts'; | |
var chart_name = 'Temps'; |
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
Tracer.server PORT, HOST, :wait => true | |
Tracer.client PORT, HOST, :wait => true |
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
app.on(:resume) do | |
... | |
end | |
# app code | |
tableView = TableView.new | |
tableView.on(:select) do |v| | |
... | |
end | |
tableView.on(:cell) do |v, index| |