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
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
""" | |
Puyo in Python. | |
Original code: | |
http://qiita.com/arc279/items/d0a0bc2cfc710f7b1ffe | |
http://okajima.air-nifty.com/b/2011/01/2011-ffac.html | |
""" |
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
test | |
テスト | |
push テスト | |
edit on github web | |
push public |
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 Twitter Transparency | |
// @namespace http://d.hatena.ne.jp/yonchu | |
// @version 0.0.2 | |
// @description Twitterのページを半透明化し、背景画像を見やすくする。 | |
// @include https://twitter.com | |
// @include https://twitter.com/* | |
// @exclude https://twitter.com/settings | |
// @exclude https://twitter.com/settings/* | |
// @see http://d.hatena.ne.jp/yonchu/ |
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
# | |
# Goolge検索 | |
# | |
# .bashrc or .zshrc などに設定してご使用する | |
# もしくは関数の中身を独立したスクリプトにして使用する | |
# | |
# e.g. | |
# $ google <keyword> | |
# | |
google() { |
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
# 直前のコマンドをクリップボードへ | |
# 第1引数:何個前のコマンドか, 未指定時は1個前のコマンドをコピー | |
# | |
# Note: .zshrc に設定して使用(エイリアス: pbcc) | |
# | |
copy_prev_cmd_to_clipboard () { | |
if [ -n "$1" ] && ! expr "$1" : '[0-9]*' > /dev/null ; then | |
echo "error: non-numeric argument" 1>&2 | |
return 1 | |
fi |
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 | |
# | |
# Print detail infomation about current git repository. | |
# | |
if ! type git > /dev/null 2>&1; then | |
echo 'Error: Git is not installed' 2>&1 | |
exit 1 | |
fi |
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 | |
# | |
# Edit command source | |
# | |
if [ $# -lt 1 ]; then | |
echo 'Should specify commands you want to edit' 1>&2 | |
exit 1 | |
fi |
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
# Add the following function to ~/.bashrc or ~/.zshrc | |
function cdsite() { | |
local py_cmd | |
py_cmd=`cat << 'EOF' | |
from __future__ import print_function | |
import sys | |
import os | |
import site |
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
### Directory aliases | |
# e.x. | |
# $ hash -d hoge=/to/path | |
# $ ls ~hoge | |
set_hash_in_links() { | |
local links=~/links | |
[ ! -d "$links" ] && return 0 | |
[ $(command ls -1 "$links" | wc -l) -eq 0 ] && return 0 | |
local src | |
local target |
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. |
OlderNewer