Skip to content

Instantly share code, notes, and snippets.

View yut148's full-sized avatar

yut148

View GitHub Profile
@jrom
jrom / nginx.conf
Created February 7, 2012 17:14
nginx hack for multiple conditions
if ($request_uri = /) {
set $test A;
}
if ($host ~* teambox.com) {
set $test "${test}B";
}
if ($http_cookie !~* "auth_token") {
set $test "${test}C";
@masudak
masudak / gist:1798332
Created February 11, 2012 09:50
embedding xhprof
// start profiling
xhprof_enable();
// ここからWPのコード
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define('WP_USE_THEMES', true);
@nekoya
nekoya / network_nfs.md
Created September 17, 2012 12:08
wiki/network/nfs

NFS server

RHEL6

sudo yum install nfs-utils.x86_64

/etc/hosts.allow, /etc/hosts.deny, /etc/exports の設定をしてnfsを上げてみる。

@caniszczyk
caniszczyk / clone-all-twitter-github-repos.sh
Created October 9, 2012 04:25
Clone all repos from a GitHub organization
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
@ainame
ainame / gist:a4f8dc30400f0dc05c96
Created April 30, 2013 11:52
チートシート

extreme fish bowl

問題

extreme fish bowlルール説明

  1. 2人1組になってプログラムを書く
  2. 書く人(ドライバー)と、横で考える人(ナビゲーター)は随時入れ替える
  3. コーディングするときは必ず何を書こうとしているのか喋りながら書く
  4. 15分の作業が終わる前にgit commitして、速やかに次のペアに席を譲る
  5. コーディング中のペア以外の人達は以下の様に何でも良いのでその場で口を出して良い。ただし、質問が優先されるべき。
  • 技術的な質問(このメソッド何なの?みたいな)
@relax-more
relax-more / gist:5641470
Created May 24, 2013 05:37
[NoSQL] NoSQL DB のパフォーマンス検証に関する情報
■ そもそも何をチェックするのか?
分散データベースをベンチマークするチェックリスト - sunsuk7tpのメモメモ
http://d.hatena.ne.jp/sunsuk7tp/20111101/1320159385
■ ツール
[YCSB - Yahoo! Cloud Serving Benchmark]
http://research.yahoo.com/Web_Information_Management/YCSB/
@Gab-km
Gab-km / whyILeftHeroku.rst
Last active December 30, 2022 10:56
何故私は Heroku から離れたか、および新しい AWS セットアップのメモ

何故私は Heroku から離れたか、および新しい AWS セットアップのメモ

原著者:Adrian Holovaty
原文:Why I left Heroku, and notes on my new AWS setup

金曜日、私は Heroku から Amazon Web Services(AWS) を直接使うように Soundslice を移行しました。私はこの変更ができてとても、そうとても嬉しくて、私がどうやったかということと、もし皆さんが同じような立場だったら何故それを検討すべきかということについて広く伝えたいと思います。

@ysaotome
ysaotome / wordpress_setup_cheatsheet.sh
Last active December 19, 2015 17:39
2台構成(Web/APPサーバ1台、DBサーバ1台)のWordpressをセットアップする時のチートシート Japan TechFesta 2013 E30: 「ニフティクラウドを使ったインフラオートメーションハンズオン」http://www.techfesta.jp/p/program-2.html#E30の Chef vs 人力対決用
#Wordpress構築チートシート
#元ネタ:https://gist.github.com/ysaotome/2235302
#対決相手:http://tily.github.io/jtf2013/
###############################################
# 環境変数を定義 WEB/APPサーバおよびDBサーバの双方で実行
###############################################
## MySQL管理ユーザのパスワード
export MYSQL_ROOT_PASS='mysql##123'
## Wordpressデータベース名
@kevingessner
kevingessner / gist:9509148
Last active April 27, 2023 15:45
Responsive emails that really work -- From Etsy's Code As Craft blog: http://codeascraft.com/2014/03/13/responsive-emails-that-really-work
<html>
<head>
<style type="text/css">
table table {
width: 600px !important;
}
table div + div { /* main content */
width: 65%;
float: left;
}

pluginコマンドのパス

/usr/share/elasticsearch/bin/以下(※Ver1.3.2で確認)

Elasticsearch-river-plugin

HP

https://github.com/elasticsearch/elasticsearch-river-wikipedia

※ElasticSearchのバージョンによってインストールするバージョンが異なるため注意

インストール