Skip to content

Instantly share code, notes, and snippets.

View glidenote's full-sized avatar

Akira Maeda glidenote

View GitHub Profile
@riywo
riywo / make-rpm.sh
Created March 15, 2012 15:28
fluent-agent-liteのrpm作るだけのshell
#!/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
@bjhess
bjhess / pull_request_webhook.md
Created May 18, 2012 15:58
The way I had to add a github repo webhook for pull requests

This is more complex than necessary.

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,
@rummelonp
rummelonp / faraday.md
Last active May 20, 2022 12:23
Ruby の HTTP クライアントライブラリ Faraday が便利そう

Ruby の HTTP クライアントライブラリ Faraday が便利そう

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] というものがよく使われてた

@hayajo
hayajo / gist:2848763
Created June 1, 2012 04:27
fluentd qmail-send log format
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]+))?.*))$/
@Gab-km
Gab-km / github-flow.ja.md
Last active April 25, 2024 04:01 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@errordeveloper
errordeveloper / Unicorn_and_Upstart.md
Last active February 9, 2022 09:21
Upstart config for a Rails app using Unicorn HTTP server

Using Unicorn with Upstart

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.

@chiastolite
chiastolite / Capfile
Last active October 16, 2018 02:04
Capistranoでファイルをアップロードする
load 'config/deploy'
@GedowFather
GedowFather / percona_backup.sh
Last active April 11, 2024 10:16
Backup & Restore Scripts for Percona XtraBackup
#!/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/
@mochiz
mochiz / gist:4736183
Last active April 16, 2023 03:56
rbenvとruby-buildでRuby環境を最新に保つ

rbenvとruby-buildでRuby環境を最新に保つ

更新日:2014/11/19

rbenv, ruby-buildを更新

$ cd ~/.rbenv
$ git pull origin master
$ cd ~/.rbenv/plugins/ruby-build
$ git pull origin master
@isdyy
isdyy / google-bigquery-json.md
Last active April 7, 2024 18:31
Google BigQuery の JSON投入を軽く試す

コマンドラインツールのインストール

$ 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