Skip to content

Instantly share code, notes, and snippets.

@sakunyo
sakunyo / reset.css
Created January 10, 2012 07:16 — forked from terkel/reset.css
CSS Reset
/*!
* CSS Reset 2011-12-25
* https://gist.github.com/gists/1360380
*
* Author: Takeru Suzuki, http://terkel.jp/
* License: Public domain
*
* Inspired by Normalize.css: http://necolas.github.com/normalize.css/
*/
@sakunyo
sakunyo / gist:4129751
Created November 22, 2012 06:56 — forked from katzchang/gist:4126092
rebaseはコミットグラフを綺麗にするためじゃなくてffマージをするためにあるのであった

ということで、ffマージはなぜ優れているかというと、マージ操作の際に機械的な構成変更が一切行われず、ブランチの移動が起こるのみなので、マージ後のブランチは、 必ず あなたが入念にテストしただろうマージしたブランチと全く同じ構成であることが保証されるわけである。これが大きい。

衝突検知をくぐり抜けて機械的マージが構成を壊してしまう例は他をご参照いただくとして、no-ffマージの場合にそういう面倒に対応する手段として次のようなものがあると思うが、いずれも確実性でffマージには劣る:

  • マージ前にバックマージを行い、マージ時の際をなくする
  • バックマージからマージまでの間に誰かのコミットが入るかもしれないので、たまに衝突したときのことも考えないとね
  • マージ後のテストで問題を発見し、修正をコミットする
  • 修正って場合によっては時間がかかる仕事でそのあいだmasterは不安定だし、マージ権限を持つ人が少数だとしたら負担でかいよね

ということで、どちらもffマージの恩恵を考えると、なかなか悩ましい。

The MIT License
Copyright (c) {year} {copyright holders}
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH T
@sakunyo
sakunyo / nodejs
Created September 27, 2013 12:32
#!/bin/sh
#
# chkconfig: 35 99 99
# description: Node.js /home/nodejs/sample/app.js
#
. /etc/rc.d/init.d/functions
USER="nodejs"