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/bash | |
# | |
# ANSI Color code (16colors) | |
# | |
# http://ascii-table.com/ansi-escape-sequences.php | |
# http://archive.linux.or.jp/JF/JFdocs/Bash-Prompt-HOWTO-5.html | |
# Escape sequence |
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/bash | |
# | |
# 1. このスクリプトをPATHの通った所(~/bin など)に置き、実行権限を与える(chmod +x tmux-pbcopy) | |
# 2. ~/.tmux.conf に以下のようにキーバインドを設定して使用 | |
# bind ^y run-shell 'tmux-pbcopy' | |
# | |
if ! type pbcopy >/dev/null 2>&1 || ! type reattach-to-user-namespace >/dev/null 2>&1; then | |
tmux display-message "Error: cannot copy to clipboard." | |
exit 0 |
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
// ==UserScript== | |
// @name hatena bookmark fix | |
// @namespace http://d.hatena.ne.jp/yonchu | |
// @version 0.0.1 | |
// @description hatena bookmark for Chrome Extension fix | |
// @include http://www.google.*/search?* | |
// @include https://www.google.*/search?* | |
// @include http://encrypted.google.*/search?* | |
// @include https://encrypted.google.*/search?* | |
// @include http://www.google.*/webhp* |
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 | |
# | |
# 引数なし | |
# - homebrewの情報を色々表示 | |
# | |
# 第1引数: | |
# - Formula名指定でFormulaの詳細情報を表示 | |
# - マッチするFormulaがない場合は検索 | |
# | |
if ! type brew >/dev/null 2>&1; then |
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 | |
# | |
# 256色のカラーパレットを表示する | |
# bash と zsh にて実行可能 | |
# | |
target_shell=$1 | |
if [ -z "$1" ]; then | |
target_shell=$(basename "$SHELL") |
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
chpwd() { | |
ls_abbrev | |
} | |
ls_abbrev() { | |
# -a : Do not ignore entries starting with .. | |
# -C : Force multi-column output. | |
# -F : Append indicator (one of */=>@|) to entries. | |
local cmd_ls='ls' | |
local -a opt_ls | |
opt_ls=('-aCF' '--color=always') |
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
#compdef grunt | |
### 変数や関数を使用する場合の注意 | |
# - 変数を使用する場合は、定義が グローバル に漏れないよう、必ず local or typeset(declare) コマンド使って変数宣言を行うこと | |
# - 関数はグローバルに定義されるため、重複しないよう名前付けには十分配慮すること | |
# − 短い補完関数であれば、関数を使わずに書くと良い | |
function __grunt() { | |
### 必要な変数を定義 | |
# 現在のコンテキスト(curcontext) を保存 |
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
#compdef httpstatus | |
# | |
# httpstatus コマンド用zsh補完関数 | |
# | |
# このファイルfpathの通ったディレクトリに置きzshを再起動して下さい。 | |
# その際ファイル名を必ず _httpstatus として下さい。 | |
# | |
# $ cp _httpstatus /usr/local/share/zsh/site-functions | |
# $ exec zsh | |
# |
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
# | |
# zaw-src-git-log | |
# | |
# zaw source for git log. | |
# https://gist.github.com/4350604 | |
# | |
# zaw : https://github.com/nakamuray/zaw | |
# | |
# git log pretty format: For detail, refer to "man git-log" |
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
# | |
# zaw | |
# | |
# https://github.com/zsh-users/zaw | |
# https://github.com/nakamuray/zaw | |
# | |
# zsh anything.el-like widget | |
# | |
# Execute action by pressing enter key or | |
# press Meta-enter for alternative action. |
NewerOlder