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
import digdag | |
class Hoge(object): | |
def hoge(self): | |
print digdag.env.params['hoge'] |
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
ls -la | grep Dropbox | awk '{print $11}' | sed -e 's/Dropbox/GoogleDrive/g' | xargs -I@ bash -c 'targ="@"; ln -sf @ ~/${targ##*/}' |
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
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" |
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
function parse_yaml () { | |
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034') | |
sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \ | |
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | | |
awk -F$fs '{ | |
indent = length($1)/2; | |
vname[indent] = $2; | |
for (i in vname) {if (i > indent) {delete vname[i]}} | |
if (length($3) > 0) { | |
vn=""; for (i=0; i<indent; i++) {vn=(vn)(vname[i])("___")} |
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 | |
# sqlalchemy | |
# https://github.com/zzzeek/sqlalchemy | |
# sqlalchemy engine | |
# http://docs.sqlalchemy.org/en/rel_1_0/core/engines.html | |
# reflection | |
# http://docs.sqlalchemy.org/en/latest/core/reflection.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
package main | |
import ( | |
"fmt" | |
"io" | |
"net/http" | |
gq "github.com/PuerkitoBio/goquery" | |
"golang.org/x/text/encoding/japanese" | |
"golang.org/x/text/transform" |
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() { | |
cat << _USAGE_ | |
usage: upload_ipa <config_json> <version> | |
This program depends on the following commands | |
jq | |
ipa (shenzhen) | |
and needs config.json like this. | |
{ |
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
package main | |
import "github.com/gographics/imagick/imagick" | |
func main() { | |
imagick.Initialize() | |
defer imagick.Terminate() | |
mw := imagick.NewMagickWand() | |
defer mw.Destroy() |
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
cd /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support | |
./lsregister -kill -r -domain system -domain local -domain user | |
# 上記の2つのコマンドを叩いたら Finderを再起動する |
NewerOlder