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
#!/bin/sh | |
USE_SED= | |
for arg in "$@" ; do | |
case $arg in | |
detail ) | |
PICK_TAGS='<(title|updated|published|app:edited|app:draft|author)>|<(link|category|summary) ' | |
;; | |
simple ) | |
PICK_TAGS='<(title|published|app:draft|author)>|<(link|category) ' |
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
#!/bin/sh | |
################################################################################ | |
# This script is only send HTTP request to HatenaBlog's AtomPub API service, | |
# and output received HTTP response body to stdout. | |
# If GET request to entry collection page, auto try GET to next page. | |
# | |
#-[Usage] | |
#- $0 GET {Path} [-a Auth-File][-v][-n FD][-l Num[:Target]] | |
#- $0 DELETE {Path} [-a Auth-File][-v] | |
#- $0 PUT {Path} [-a Auth-File][-v][-f Tx-File] |
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
#!/bin/sh | |
CMD_NAME=`basename $0` | |
usage_exit() { | |
cat <<- HELPEND | |
$CMD_NAME wait_time[hms] [-c command | message] | |
wait_time wait time[unit] | |
[unit] | |
h: hours = wait_seconds * 3600 [sec] | |
m: minutes = wait_seconds * 60 [sec] | |
s: seconds = wait_seconds [sec] (default) |
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
#!/bin/sh | |
CMD_NAME=`basename $0` | |
VERSION=0.1.0 | |
usage() { | |
cat <<- HELPEND | |
"pkg" wrapper command with fzf | |
USAGE: | |
$CMD_NAME [-l] [-niIRv] [package-name] | |
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
# USAGE: source "$0" on c-shell | |
set select_command=`history -r \ | |
| fzf-tmux --no-sort --nth 3.. -d 90% \ | |
| tr '\t' ' ' \ | |
| sed -e 's/^[ ]*[0-9]*[ ]*[0-9:]*//'` | |
if ( "$select_command" == "" ) exit 0 | |
eval $select_command | |
unset select_command | |
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
# USAGE: source "$0" on c-shell | |
if ( "$1" != "" ) then | |
if ( ! -d "$1" ) then | |
echo "'$1' is not directory!" | |
exit 1 | |
endif | |
set root=$1 | |
else | |
set root="." | |
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
#!/bin/sh | |
query=$1 | |
if [ $# -eq 2 ]; then | |
[ -d "$1" ] && cd "$1" \ | |
|| ( echo "'$1' is not directory!" && exit 1 ) | |
query=$2 | |
fi | |
selected_files=`fzf --query="$query" --multi --select-1 --preview "head -n 100 {}"` | |
[ -n "$selected_files" ] && nvim `echo "$selected_files" | tr '\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
################################################## | |
# Basic config | |
################################################## | |
# use shell (don't load .login file) | |
set -g default-command /bin/tcsh | |
# buffer line size | |
set -g history-limit 10000 | |
# start index |
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
#!/bin/sh | |
CMD_NAME=`basename $0` | |
TEMP_FILE="$HOME/.cache/$CMD_NAME.$$.html" | |
# help | |
Usage(){ | |
cat <<- HELPEND | |
$CMD_NAME [-b][-f][-u] PageName | |
Open manual page. | |
-b Base Definitions (XBD) ... C header files. |
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
#!/bin/sh | |
CMD_NAME=`basename "$0"` | |
TMP_FILE="/tmp/${CMD_NAME}.$$.html" | |
Usage(){ | |
cat <<- HELPEND | |
$CMD_NAME [-v version] [section-number] page-name | |
-v target freebsd version | |
HELPEND | |
} |