Skip to content

Instantly share code, notes, and snippets.

@mattn
mattn / godoc.vim
Last active August 28, 2019 06:35
" A ref source for godoc.
" Version: 0.0.1
" Author : mattn <mattn.jp@gmail.com>
" 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
@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 <tyru.exe@gmail.com>'"
#opts="$opts --enable-perlinterp"
#!/bin/sh
conf() {
./configure \
--with-features=huge \
--with-compiledby="thinca <thinca@gmail.com>" \
--enable-multibyte \
--enable-gui=gtk2 \
--enable-rubyinterp \
--enable-pythoninterp \
@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
@repeatedly
repeatedly / d_master.md
Last active July 16, 2024 17:07
D言語基礎文法最速マスター

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

1. 基礎

ソースファイル

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

main

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

@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:

@rummelonp
rummelonp / zsh_completion.md
Last active February 22, 2023 15:06
zsh の補完関数の自作導入編

zsh の補完関数の自作導入編

あまり深く理解してないので識者のツッコミ大歓迎

補完を有効にする

取り敢えず最低限だけ

# 補完を有効にする
@yonchu
yonchu / _httpstatus.zsh
Last active December 14, 2015 01:19
httpstatusコマンド用zsh補完関数
#compdef httpstatus
#
# httpstatus コマンド用zsh補完関数
#
# このファイルfpathの通ったディレクトリに置きzshを再起動して下さい。
# その際ファイル名を必ず _httpstatus として下さい。
#
# $ cp _httpstatus /usr/local/share/zsh/site-functions
# $ exec zsh
#
@deton
deton / gist:5138905
Last active April 5, 2024 11:11
Vimでの日本語のカーソル移動の改善: 文節単位のWORD移動(W,E,B)プラグインと、句読点に移動するmap
@ujihisa
ujihisa / vac9.md
Created April 16, 2013 05:06
Vim Advent Calendar 2012 ujihisa 9

Vim Advent Calendar 2012 ujihisa 9

Vim Advent Calendar 2012 の134日目の記事です。 昨日はmanga_osyoさんによる\(・ω・\)SAN値!(/・ω・)/ピンチ!でした。

前々回の著者によるVim Advent Calendarの記事にて、以下のような記述があったのをお覚えでしょうか。

SimCityを無事入手し、それをGentoo Linux上のWineで動作させるため数日間悪戦苦闘し、結局諦めてWindowsを購入しました。しかしオンボードのIntel HD 3000では動作速度が遅く、いまはグラフィックボードの購入を真剣に検討しています。Gentoo Linuxとデュアルブートする予定なので、LinuxからちゃんとGPGPUに使えるようなものにしたいですね。

というわけで購入しました。Radeon HD 7850 (2GB RAM) というやつです。ビデオカード業界には全く詳しくなく、調査するのにとても時間がかかりました。Video CardのVはVimのVです。我々はもっとこの分野にも精通する必要があるのではないか、と感じました。