Skip to content

Instantly share code, notes, and snippets.

@kazukgw
kazukgw / devenv.sh
Last active December 11, 2016 05:37
run devenv
function devenv() {
cname=$(docker ps -a --format '{{.Image}} {{.Names}} {{.Status}}' | awk 'match($1, /devenv/) {print $2} ')
if [[ -n "$cname" ]]; then
status=$(docker ps -a --format '{{.Image}} {{.Names}} {{.Status}}' | awk 'match($1, /devenv/) {print $3} ')
echo "==> status: $status"
if [[ $status =~ ^Up.* ]]; then
echo "==> exec $cname"
docker exec -it $cname /bin/bash
else
echo "==> start and attach $cname"
@kazukgw
kazukgw / recreate_dotfiles_symlink.sh
Created February 5, 2017 05:35
~/Dropbox/dotfiles をsource に指定しているdotfilesのsymlink を GoogleDriveをsourceとして作成しなおす
@kazukgw
kazukgw / hoge.py
Created October 30, 2017 15:16
digdag-example
import digdag
class Hoge(object):
def hoge(self):
print digdag.env.params['hoge']