Skip to content

Instantly share code, notes, and snippets.

@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 = [email protected]: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:

@repeatedly
repeatedly / d_master.md
Last active December 17, 2024 10:01
D言語基礎文法最速マスター

他の言語をある程度知っている人はこれを読めばD言語の基礎をマスターでき,D言語の氷山の一角くらいは知ることができると思います.対象バージョンはdmd 2.059です.

1. 基礎

ソースファイル

ASCIIかUTFしか受け付けません.それ以外の文字コードで書くとコンパイルエラーになります.

main

D言語のmainはCとは違い以下のようなシグネチャです.

@jamiehodge
jamiehodge / gist:1327195
Created October 31, 2011 09:38
Warden and Sinatra example
require 'sinatra/base'
require 'rack/flash'
require 'warden'
require 'slim'
require 'sequel'
require 'sqlite3'
DB = Sequel.sqlite
DB.create_table :users do
primary_key :id
#!/bin/sh
conf() {
./configure \
--with-features=huge \
--with-compiledby="thinca <[email protected]>" \
--enable-multibyte \
--enable-gui=gtk2 \
--enable-rubyinterp \
--enable-pythoninterp \
@tyru
tyru / build
Created May 13, 2011 10:38
Vim build script
#!/bin/sh
set -e
cd $(dirname $0)/..
opts="--prefix=/usr/local"
opts="$opts --with-features=huge"
opts="$opts --enable-multibyte"
opts="$opts --with-compiledby='tyru <[email protected]>'"
#opts="$opts --enable-perlinterp"
@mattn
mattn / godoc.vim
Last active August 28, 2019 06:35
" A ref source for godoc.
" Version: 0.0.1
" Author : mattn <[email protected]>
" License: Creative Commons Attribution 2.1 Japan License
" <http://creativecommons.org/licenses/by/2.1/jp/deed.en>
let s:save_cpo = &cpo
set cpo&vim