Skip to content

Instantly share code, notes, and snippets.

View akiradeveloper's full-sized avatar

Akira Hayakawa akiradeveloper

  • Yokohama
View GitHub Profile
@akiradeveloper
akiradeveloper / gist:3311755
Created August 10, 2012 06:26
dotfiles login
Last login: Fri Aug 10 15:29:33 2012 from kamille.local
/etc/profile
/etc/bash.bashrc
[add] /usr/local/ghc/bin
[add] /usr/local/rvm/bin
[add] /usr/local/vim/bin
read .bash_profile
read zsh_activation
current shell: /bin/bash
zsh path: /usr/bin/zsh
@akiradeveloper
akiradeveloper / gist:3341430
Created August 13, 2012 14:51
ghc-modをインストールしようとしたらこんな狂ったメッセージ
Linking /tmp/haskell-src-exts-1.13.3-4896/haskell-src-exts-1.13.3/dist/setup/setup ...
Configuring haskell-src-exts-1.13.3...
setup: The program happy version >=1.17 is required but it could not be found.
cabal: Error: some packages failed to install:
ghc-mod-1.11.0 depends on haskell-src-exts-1.13.3 which failed to install.
haskell-src-exts-1.13.3 failed during the configure step. The exception was:
ExitFailure 1
hlint-1.8.30 depends on haskell-src-exts-1.13.3 which failed to install.
@akiradeveloper
akiradeveloper / gist:3341971
Created August 13, 2012 15:37
色々入れたらvimfilerがバグった・・
function <SNR>1_toggle_vimfiler..<SNR>32_call_vimfiler..vimfiler#switch_filer..<SNR>75_create_filer..vimfiler#handler#_event_handler..<SNR>76_on_BufReadCmd..<SNR>76_initialize_vim
filer_directory..vimfiler#force_redraw_screen..vimfiler#get_directory_files..unite#get_vimfiler_candidates..<SNR>33_get_candidates..<SNR>33_recache_candidates..<SNR>33_recache_can
didates_loop..<SNR>33_get_source_candidates..39..37..unite#util#glob..vimproc#readdir..<SNR>63_libcall, line 16
Press ENTER or type command to continue
vimproc: vp_readdir: ['opendir() error: No such file or directory']
Press ENTER or type command to continue
[unite.vim] Error occured in vimfiler_gather_candidates!
Press ENTER or type command to continue
[unite.vim] Source name is file
@akiradeveloper
akiradeveloper / gist:3346589
Created August 14, 2012 05:30
NeoBundleUpdate neocomplcacheできねー
/home/akira/.vim/bundle/neocomplcache
github.com[0: 207.97.227.239]: errno=Connection timed out^@fatal: unable to connect a socket (Connection timed out)
@akiradeveloper
akiradeveloper / 擬似コード(推測)
Created August 14, 2012 23:28
vimscriptの読み込み順
擬似コードでいうとこういう感じなのではないかと推測.
runtimepath = [..., .vim, .vim/after]
def read_script_common(types):
types.each do |type|
runtimepath.each do |rp|
source File.join(rp, type)
# 単純に $ vim とした時
@akiradeveloper
akiradeveloper / haddock_browserを変えた.
Created August 16, 2012 08:04
haddockのbrowse_remoteが表示されないので調べる.
browserはw3mを指定してるのだけどこれが悪い?
悪くないと仮定してコードを読む.
function! s:browse(candidate, uri)
if exists('g:unite_source_haddock_browser')
call unite#util#system(printf('%s %s &', g:unite_source_haddock_browser, shellescape(a:uri)))
else
call unite#take_action('start', extend(deepcopy(a:candidate), { 'action__path': a:uri }))
endif
@akiradeveloper
akiradeveloper / gist:3370072
Created August 16, 2012 13:27
僕のdotfiles設計
* srcからbuildにerbを使って変換をする. proxy設定などの差異もここで吸収される(家ではプロキシなんかないけど会社だとあったりするし, 部署によって設定は違う). buildとpre-buildから, $HOME以下にシンボリックリンクが張られる.
* ふつうは.vim/bundleにプラグインを入れていくのだろうけど, 敢えて.vimbundleにしている. これは, このdotfilesをパージして入れ直すなどした時にプラグインも入れ直すのが嫌だから. SSDが傷つくのが嫌だから.
https://github.com/akiradeveloper/dotfiles
akira@Paptimus> cat .dotfiles.conf ~/dotfiles
export BEHIND_PROXY=0
export PROXY_IP=192.168.0.1
export PROXY_PORT=8080
動作:
1. ファイルが存在するならば, 単にtouchして終わる.
2. 絶対パスを計算する.
3. /dev/shm/絶対パス にファイルを作る.
4. ファイルから/dev/shm以下のファイルにsymlinkする.
ちゃんと動いてそうなことを確認.
akira@Paptimus> ./memtouch /tmp/hige ~/dotfiles/user/pre-build/bin
akira@Paptimus> ls -l /tmp/hige ~/dotfiles/user/pre-build/bin
@akiradeveloper
akiradeveloper / gist:3378402
Created August 17, 2012 12:20
indent-guidesバグ?
Error detected while processing function <SNR>26_IndentGuidesToggle..indent_guides#toggle..indent_guides#enable..indent_guides#init_script_vars..indent_guides#capture_highlight:
line 2:
E411: highlight group not found: Normal
Error detected while processing function indent_guides#process_autocmds..indent_guides#enable..indent_guides#init_script_vars..indent_guides#capture_highlight:
@akiradeveloper
akiradeveloper / init_process
Created August 18, 2012 11:49
vimshellデバッグ
init_process
[{'fd': {'stderr': '', 'stdin': '', 'stdout': ''}, 'args': ['', '']}]
{'is_interactive': 1, 'fd': {'stderr': '', 'stdin': '', 'stdout': ''}, 'has_head_spaces': 0, 'is_insert': 1, 'is_single_command': 1}
{'--encoding': 'char', '--syntax': 'vimshell'}