Skip to content

Instantly share code, notes, and snippets.

View rskull's full-sized avatar

Ryota Mogi rskull

View GitHub Profile
Jenkins × PHP環境構築の巻
■目的
PHP環境に対応したJenkins設定を行い、
コミットされる度にサーバ上でのPHPUnitの実行 及び
カバレッジレポート出力を"全自動"で行えるようにすること。
1) PHP Pear系のインストール
sudo pear channel-discover pear.phing.info
sudo pear channel-discover pear.pdepend.org
@rskull
rskull / gist:1326182
Created October 30, 2011 17:49
今月の最終日を取得する
//今月の最終日取得
function lastday () {
var now = new Date();
var y = now.getFullYear();
var m = now.getMonth();
for (i=27;i<=32;i++) {
var check = new Date(y, m, i);
if (check.getMonth() != m) {
return i - 1;
}
@MicahElliott
MicahElliott / colortrans.py
Created November 29, 2010 07:57
Convert values between RGB hex codes and xterm-256 color codes.
#! /usr/bin/env python
""" Convert values between RGB hex codes and xterm-256 color codes.
Nice long listing of all 256 colors and their codes. Useful for
developing console color themes, or even script output schemes.
Resources:
* http://en.wikipedia.org/wiki/8-bit_color
* http://en.wikipedia.org/wiki/ANSI_escape_code