GitHub webhooks for a URL by default only fire on repo pushes. There appears to be no way in the web UI to set up webhooks for other events. And so we go to the API. I prefer to do this type of thing with Hurl.
{
"name": "web",
"active": true,
#!/bin/sh | |
if [ -z "$1" ]; then | |
echo "usage: ./make-rpm.sh 0.2" | |
exit 1 | |
fi | |
version=$1 | |
cur=`pwd` | |
rm -f fluent-agent-lite.v$version.tar.gz | |
rm -fr fluent-agent-lite |
GitHub webhooks for a URL by default only fire on repo pushes. There appears to be no way in the web UI to set up webhooks for other events. And so we go to the API. I prefer to do this type of thing with Hurl.
{
"name": "web",
"active": true,
Ruby の HTTP クライアントライブラリ Faraday が便利そう
API ラッパの開発には [RestClient gem][rest_client_gem] だとか
OAuth の必要なものは [Net/HTTP][net_http] + [OAuth gem][oauth_gem] を使ってた
[Twitter gem][twitter_gem] や [Instagram gem][instagram_gem] など API ライブラリのソースを読んでみると
[Faraday gem][faraday_gem] というものがよく使われてた
format /^(?<tai64>[^ ]+) (?<message>(((?:new|end) msg (?<key>[0-9]+)|info msg (?<key>[0-9]+): bytes (?:\d+) from <(?<address>[^>]*)> |starting delivery (?<delivery_id>[0-9]+): msg (?<key>[0-9]+) to (?:local|remote) (?<address>.+)|delivery (?<delivery_id>[0-9]+))?.*))$/ |
This configuration works with Upstart on Ubuntu 12.04 LTS
The reason why it needs to be done this way (i.e. with the pre-start
and post-stop
stanzas), is because Upstart
is unable to track whever Unicorn master process re-execs itself on hot deploys. One can use it without hot-deploys
and run Unicorn in foreground also, it then only needs one exec stanza.
This presumes you are not using RVM, so no voodoo dances.
load 'config/deploy' |
#!/bin/bash | |
# | |
# ============================================================ | |
# | |
# @license This program is free software. | |
# | |
# @category Script for Percona Server | |
# @project Gedow Software | |
# @package Gedow Percona Utils | |
# @author GedowFather http://blog.father.gedow.net/ |
コマンドラインツールのインストール
$ easy_install bigquery
$ bq init
ロード(テーブル作成・データ投入; project と dataset までは作成済みという前提)
$ bq load --source_format=NEWLINE_DELIMITED_JSON mydataset.nested01 nested01.data.json nested01.fields.json
Waiting on job_d7ebcad03b8247fc8b6f8313f0689a28 ... (26s) Current status: DONE