This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Download git and make gitweb/gitweb.cgi (See gitweb/INSTALL how to set gitweb root etc.) | |
# 2. Copy this file as gitweb/app.psgi | |
# 3. cd gitweb; plackup | |
# 4. Access http://localhost:3000/gitweb.cgi | |
use Plack::Builder; | |
use Plack::App::WrapCGI; | |
use Plack::App::File; | |
builder { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" 基本アイデア: 名前空間を実行時の環境に合わせることでファイルの変更なし | |
" にコピーできるようにする。 | |
let s:ns = expand('<sfile>:p:r:gs?[\\/]?#?:s?^.*#autoload#??:s?$?#?') | |
function {s:ns}func() | |
echo "func()" | |
endfunction | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# configuration for osx clipboard support | |
set-option -g default-command "reattach-to-user-namespace -l sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" tmux will only forward escape sequences to the terminal if surrounded by a DCS sequence | |
" http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTinkbdoZ8eNR1X2UobLTeww1jFrvfJxTMfKSq-L%2B%40mail.gmail.com&forum_name=tmux-users | |
if exists('$TMUX') | |
let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\" | |
let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\" | |
else | |
let &t_SI = "\<Esc>]50;CursorShape=1\x7" | |
let &t_EI = "\<Esc>]50;CursorShape=0\x7" | |
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include this in your ~/.zshrc or ~/.bashrc | |
pconsole () { | |
if [[ $1 == production ]]; | |
then RAILS_ENV=production bundle exec pry -r ./config/environment.rb -r rails/console/app -r rails/console/helpers; | |
elif [[ $1 == test ]]; | |
then RAILS_ENV=test pry -r ./config/environment.rb -r rails/console/app -r rails/console/helpers; | |
else bundle exec pry -r ./config/environment.rb -r rails/console/app -r rails/console/helpers; | |
fi } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" == Naming convention. == {{{1 | |
" Command name | |
" - CamelCase | |
" Global function name | |
" - CamelCase | |
" Local function name | |
" - s:split_by_underbar | |
" Group name for autocmd | |
" - split-by-dash | |
" In vimrc, start with "vimrc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# switch default editor for pry to sublime text | |
Pry.config.editor = "sublime" | |
# format prompt to be <Rails version>@<ruby version>(<object>)> | |
Pry.config.prompt = proc do |obj, level, _| | |
prompt = "\e[1;30m" | |
prompt << "#{Rails.version} @ " if defined?(Rails) | |
prompt << "#{RUBY_VERSION}" | |
"#{prompt} (#{obj})>\e[0m" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HG changeset patch | |
# Parent 2cab0b1a3f2992429db480acd43d852a4c85d95e | |
Make compact stored functions (skeleton) | |
diff -r 2cab0b1a3f29 src/eval.c | |
--- a/src/eval.c Wed Jan 11 18:57:32 2012 +0900 | |
+++ b/src/eval.c Wed Jan 11 22:53:08 2012 +0900 | |
@@ -503,6 +503,8 @@ | |
static void f_cindent __ARGS((typval_T *argvars, typval_T *rettv)); | |
static void f_clearmatches __ARGS((typval_T *argvars, typval_T *rettv)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int print_board(int board[][8]) { | |
for (int i = 0; i < 8; i++) { | |
for (int j = 0; j < 8; j++) { | |
if (board[i][j]) | |
printf("Q "); | |
else | |
printf(". "); | |
} | |
printf("\n"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* Japanese translated by hissy | |
* | |
* CODEX: http://wpdocs.sourceforge.jp/%E9%96%A2%E6%95%B0%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9/WP_Query#.E3.83.91.E3.83.A9.E3.83.A1.E3.83.BC.E3.82.BF | |
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php | |
* Original: https://gist.github.com/luetkemj/2023628/9e911982440141a13cb1dd8ba1ad6b35cd7bbdd7 | |
*/ |
OlderNewer