Skip to content

Instantly share code, notes, and snippets.

## 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() {
syntax enable
set number
set ruler
set list
set listchars=tab:>-,trail:-,nbsp:%,extends:>,precedes:<,eol:<
set incsearch
set hlsearch
set nowrap
set showmatch
syntax enable
set number
set ruler
set list
set listchars=tab:>-,trail:-,nbsp:%,extends:>,precedes:<,eol:<
set incsearch
set hlsearch
set nowrap
set showmatch
# export
export LANG=ja_JP.UTF-8
export PATH=$PATH:$HOME/.bin
export PLUGIN=$HOME/.zsh
export BUNDLE=$HOME/.vim/bundle
export GITHUB=https://github.com
export HISTFILE=~/.zsh_history
export HISTSIZE=20000
export SAVEHIST=20000
autoload -U compinit promptinit
compinit
zstyle ':completion:*:default' menu select=1
promptinit
prompt walters
alias up="pacman -Syu --noconfirm"
alias v="vim"
alias vs="v ~/.vimrc"
set -g status-fg white
set -g status-bg black
set -g pane-border-fg colour235
set -g pane-active-border-fg colour240
set -g prefix ^T
unbind C-b
unbind ^z
unbind !
unbind "\""
particlesJS("particles-js", {
"particles": {
"number": {
"value": 80,
"density": {
"enable": true,
"value_area": 800
}
},
"color": {
@syui
syui / comic-walker.com-screenshot.sh
Created November 17, 2015 08:47
comic-walker.com-screenshot.
#!/usr/local/bin/zsh
case $1 in
"") pg=16 ;;
*) pg=$1 ;;
esac
tl=`osascript -e 'tell application "Google Chrome" to get NAME of active tab of first window' | cut -d ' ' -f -1`
ul=`osascript -e 'tell application "Google Chrome" to get URL of active tab of first window'`
ul=`echo ${ul:t} | cut -d = -f 4-`
@syui
syui / qiita-unfollow.sh
Created November 17, 2015 08:48
qiita-unfollow
#!/usr/local/bin/zsh
user=$USER
page=`curl -sL http://qiita.com/${user}/following_users | grep data-pjax | tail -n 1 | cut -d "?" -f 2 | cut -d '"' -f 1 | cut -d = -f 2`
#user=syui
#page=12
following=$(for (( i=1;i<=${page};i++ ))
do
html=`curl -sL "http://qiita.com/${user}/following_users?page=${i}" | grep 'span itemprop="name"' | tr '>' '\n' | grep -A1 'itemprop="name"' |cut -d '<' -f -1`
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script src="../static/js/jquery.xdomainajax.js"></script>
<script src="../static/bower_components/d3/d3.min.js" charset="utf-8"></script>
<script src="../static/bower_components/cal-heatmap/cal-heatmap.min.js"></script>
<link rel="stylesheet" href="../static/bower_components/cal-heatmap/cal-heatmap.css" />
<!--<script src="https://raw.githubusercontent.com/syui/jquery.fn/master/cross-domain-ajax/jquery.xdomainajax.js"></script>-->
<!--diff : https://github.com/syui/jquery.fn/blob/master/cross-domain-ajax/jquery.xdomainajax.js#L62 -->
<h3>Calendar Activities</h3>
<div id="cal-heatmap"></div>
<div id="example-heatmap"></div>