Skip to content

Instantly share code, notes, and snippets.

View wnoguchi's full-sized avatar
😀

Wataru Noguchi wnoguchi

😀
View GitHub Profile
@wnoguchi
wnoguchi / unicorn.rb
Created November 15, 2012 00:59
unicorn configuration
# coding: utf-8
# Wataru Noguchi <wnoguchi@unicast.ne.jp>
application = 'app-name'
#listen "/tmp/unicorn_#{application}.sock"
listen 4000
pid "/tmp/unicorn_#{application}.pid"
worker_processes 6
@wnoguchi
wnoguchi / session.php
Last active December 18, 2015 12:09
phpMyAdminの開発用セッションタイムアウト延長コード。1週間。
<?php
// Ubuntuでaptitudeでインストールした場合:
// 正しくは以下のファイルに記述することが重要。
// /var/lib/phpmyadmin/config.inc.php
// 下の2つのファイルは変更しても設定が反映されないので注意。
// /etc/phpmyadmin/config.inc.php
// /usr/share/phpmyadmin/setup/frames/config.inc.php
ini_set("session.gc_maxlifetime", 604800);
$cfg['LoginCookieValidity'] = 604800;
@wnoguchi
wnoguchi / test.php
Created June 17, 2013 05:23
PHP動作テスト用のサンプルスクリプト。
<?php
echo "<h1>" . date("Y/m/d (D) H:i:s", time()) . "</h1>";
@wnoguchi
wnoguchi / gist:5795531
Created June 17, 2013 08:48
gitでマージするときにコミットしないようにするには。
$ git checkout staging
Switched to branch 'staging'
$ git merge --squash master
@wnoguchi
wnoguchi / gist:5795593
Created June 17, 2013 08:59
gitのユーザーごとのコミット数を調べる。
git shortlog -sn
182 Wataru Noguchi
18 Foo Bar
@wnoguchi
wnoguchi / .gitconfig
Last active December 18, 2015 16:29
僕の自慢の.gitconfigです。
[core]
quotepath = false
[user]
name = Wataru Noguchi
email = wnoguchi.0727@gmail.com
@wnoguchi
wnoguchi / .gitconfig
Created June 26, 2013 05:10
git diffでp4mergeを使う方法。
[diff]
external = p4diff
@wnoguchi
wnoguchi / ubuntu-13.04-shortcuts.md
Last active December 19, 2015 03:29
Ubuntuの便利なショートカット。

Ubuntuの便利なショートカット

  • ワークスペースをカスタマイズする場合は Unity Tweak Tool を使う
  • Super+S ワークスペースの一覧
  • ドラッグアンドドロップでウィンドウの別ワークスペースへの移動
  • Ctrl+Alt+カーソルキー ワークスペース間の移動
  • Super+W ウィンドウを一覧表示
# Gemfile
# Use Capistrano for deployment
group :development do
# capistrano
gem 'capistrano', group: :development
# multistage extension
gem 'capistrano-ext', group: :development
# rbenv extension
gem 'capistrano-rbenv', group: :development
end
@wnoguchi
wnoguchi / gist:5946720
Created July 8, 2013 06:54
ブートセクタがぶっこわされたときの魔法の呪文
bootrec /fixboot
bootrec /fixmbr