Skip to content

Instantly share code, notes, and snippets.

View superbrothers's full-sized avatar
🌏
Working from the earth

Kazuki Suda superbrothers

🌏
Working from the earth
View GitHub Profile
@apsoto
apsoto / base.rb
Created March 7, 2011 18:11 — forked from jtimberman/base.rb
a sample base chef role
name "base"
description "Baseline configuration for all systems."
run_list(
"recipe[ohai]",
"recipe[chef-client::delete_validation]",
"recipe[chef-client]",
"recipe[zsh]",
"recipe[git]",
"recipe[users]",
@biovisualize
biovisualize / index.html
Created June 9, 2011 14:42
Simple D3 tooltip
<!DOCTYPE html>
<html >
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
</head>
<body>
<div class="example_div"></div>
<script type="text/javascript">
var tooltip = d3.select("body")
.append("div")
@yoshikaw
yoshikaw / Screenx.rb
Created December 25, 2011 14:22
開発版GNU Screenにあてているパッチ
require 'formula'
class Screenx < Formula
homepage 'http://www.gnu.org/software/screen/'
url 'http://git.savannah.gnu.org/cgit/screen.git/snapshot/screen-master.tar.gz'
sha1 '642588a585fca1def67bd85172addf9cd0a0c745'
version '4.1.0-20110819git450e8f3'
head 'git://git.savannah.gnu.org/screen.git', :branch => 'master'
@riywo
riywo / dstat_log.pl
Created March 18, 2012 06:31
dstatのCSVをその場でパースしてなんかする方法
#!/usr/bin/env perl
use strict;
use warnings;
use POSIX qw/mkfifo/;
use File::Temp qw/tempfile/;
use Scalar::Util qw/looks_like_number/;
use IO::Handle;
my $log_file = '/tmp/dstat.log';
my (undef, $pipe) = tempfile("dstat_XXXX", DIR => '/tmp', SUFFIX => '.pipe');
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@superbrothers
superbrothers / ansi-color.php
Created August 23, 2012 01:49
ANSI color terminal output module for php
<?php
/**
* php-ansi-color
*
* Original
* https://github.com/loopj/commonjs-ansi-color
*
* @code
* <?php
* require_once "ansi-color.php";
@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)
@detro
detro / script-FIXED.js
Created October 8, 2012 17:05 — forked from davisford/script-log.js
phantom cookies: now cookies are PERSISTENT as expected
var page = require('webpage').create();
phantom.cookiesEnabled = true;
console.log('\n\n cookies we know about => \n\n' + JSON.stringify(phantom.cookies, null, 2));
// spoof user-agent
page.settings.userAgent = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0';
const USER = 'cvUg338yQa';
const PASS = 'GNyoqNKJK5';
@hayajo
hayajo / changelog_en.md
Last active May 3, 2024 08:29
ChangeLog を支える英語

ChangeLog を支える英語

ChangeLog を書く際によく使われる英語をまとめました。

ほとんど引用です。

基本形

@mirakui
mirakui / compile_assets_and_rsync_with_remote_cache.rb
Created November 15, 2012 13:19
Fast deploy using capistrano_rsync_with_remote_cache and turbo-sprockets-rails3
# Requirements:
# https://github.com/vigetlabs/capistrano_rsync_with_remote_cache
# https://github.com/ndbroadbent/turbo-sprockets-rails3
require 'capistrano/recipes/deploy/strategy/rsync_with_remote_cache'
Capistrano::Deploy::Strategy::RsyncWithRemoteCache.class_eval do
def deploy!
update_local_cache
prepare_assets
update_remote_cache
finalize_assets