Skip to content

Instantly share code, notes, and snippets.

syntax enable
set number
set ruler
set list
set listchars=tab:>-,trail:-,nbsp:%,extends:>,precedes:<,eol:<
set incsearch
set hlsearch
set nowrap
set showmatch
## zsh/growl integration: any command that takes longer than 5 seconds
## will trigger a growl notification when it completes.
if [ -f /usr/local/bin/terminal-notifier ] ; then
preexec() {
zsh_growl_cmd=$1
zsh_growl_time=`date +%s`
}
precmd() {
#!/bin/bash
# all-command {{{
#sudo fastboot flash bootloader bootloader-flo-flo-04.05.img && sudo fastboot flash boot boot.img && sudo fastboot erase system && sudo fastboot flash system system.img && sudo fastboot flash recovery twrp-2.8.6.0-flo.img && sudo fastboot boot CF-Auto-Root-flo-razor-nexus7.img
# }}}
# android
# https://developers.google.com/android/nexus/images
# twrp
## zsh/growl integration: any command that takes longer than 5 seconds
## will trigger a growl notification when it completes.
case $OSTYPE in
darwin*)
notify="growlnotify"
notifyo=$notify" -m"
;;
linux*)
notify="notify-send"
fu! s:peco_zsh_history()
sil! !cat ~/.zsh_history | peco | pbcopy
sil! redraw!
put
endf
com! PecoZshHistory call <SID>peco_zsh_history()
nn <Plug>(PecoZshHistory) :PecoZshHistory<CR>
nm <Leader>pe <Plug>(PecoZshHistory)
--- /usr/bin/packer 2014-08-11 10:43:24.000000000 +0200
+++ /usr/bin/packer.xmw 2015-01-01 23:39:05.706239397 +0100
@@ -328,7 +328,9 @@
# Installation (makepkg and pacman)
if [[ $UID -eq 0 ]]; then
- makepkg $MAKEPKGOPTS --asroot -f
+ id pacman >/dev/null 2>/dev/null || useradd -r -d /var/empty pacman
+ chown -R pacman:pacman .
+ su -c "makepkg $MAKEPKGOPTS -f" pacman
# Linux boot script for Android v5.0.2
# OS Type : Arch Linux
# img : /sdcard/archlinux/archlinux-CORE.ext4.img
###########################################
# This is a function we use to stop the #
# script in case of errors #
###########################################
error_exit() {
echo "Error: $1"
#!/bin/bash
dire=`echo $1 | sed -e 's@[^/]@@g'`
numb=`expr ${#dire} + 1`
find $* | cut -d / -f $numb
#!/bin/zsh
# github, bitbucket {{{
dot=`curl -s http://vim-jp.org/reading-vimrc/json/archives.json | jq -r '.[] | .vimrc | .[] | .url' | sed -e 's/\/github.com/\/raw.githubusercontent.com/g' -e 's/\/blob//g' -e 's/\/gist.github.com/\/gist.githubusercontent.com\/thinca/g' -e 's/\/src/\/raw/g'`
line=`echo $dot | wc -l | tr -d ' '`
for (( i=1; i<=$line;i++ ))
do
repo=`echo $dot | awk "NR==$i"`
### default {{{
set -s escape-time 0
set-window-option -g utf8 on
set-window-option -g mode-keys vi
set-window-option -g automatic-rename on
set-option -g set-titles on
set-option -g base-index 1
set-option -g pane-base-index 1