View check-replaced-package.bash
#!/bin/bash | |
findup () { | |
CWD=$1 | |
while [ "$CWD" != "/" ]; do | |
if [ -f "$CWD/go.mod" ]; then | |
echo "$CWD/go.mod" | |
return 0 | |
fi | |
CWD=$(dirname $CWD) |
View detect_mp4_duration.sh
#!/bin/sh | |
# http://qiita.com/takashisite/items/0eeb45c8bbd232e915dd | |
ffmpeg -i movie.mp4 2>&1 | grep "Duration" | cut -d ' ' -f 4 | sed s/,// | sed 's@\..*@@g' | awk '{ split($1, A, ":"); split(A[3], B, "."); print 3600*A[1] + 60*A[2] + B[1] }' |
View Dockerfile
# Dockerfile - Ubuntu Xenial | |
# https://github.com/openresty/docker-openresty | |
ARG RESTY_IMAGE_BASE="ubuntu" | |
ARG RESTY_IMAGE_TAG="xenial" | |
FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG} | |
LABEL maintainer="Evan Wies <evan@neomantra.net>" |
View setup.sh
#!/bin/bash | |
YOU=`whoami` | |
CWD=$(cd $(dirname $0);pwd) | |
# Create mout storage directory if not exists | |
if [ ! -d "$HOME/perfstore/graphite" ]; then | |
echo "creating directory: $HOME/perfstore/graphite..." | |
mkdir -p $HOME/perfstore/graphite | |
fi |
View request.lua
---------------------------------------------------------------- | |
-- Lua common HTTP request library | |
-- | |
-- This library is utility for common HTTP/HTTPS request usage, | |
-- and provide easy syntax like python requests module. | |
-- | |
-- Dependencies | |
-- - [luasocket](https://github.com/diegonehab/luasocket) | |
-- - [luasec](https://github.com/brunoos/luasec) | |
-- - [net-url](https://github.com/golgote/neturl) |
View get_credential.go
package main | |
import ( | |
"bufio" | |
"context" | |
"errors" | |
"fmt" | |
"time" | |
"encoding/json" |
View example.go
package main | |
import ( | |
"fmt" | |
"github.com/satori/go.uuid" | |
"github.com/stretch/testify/assert" | |
) | |
func main() { |
View client.go
package main | |
import ( | |
"bufio" | |
"fmt" | |
"log" | |
"net" | |
"strings" | |
"sync" | |
"time" |
View detect_nullbyte.go
package main | |
import ( | |
"fmt" | |
) | |
func detect_nullbyte(str string) bool { | |
for _, b := range str { | |
if b == '\u0000' { | |
return true |
View mtk
#!/bin/sh | |
echo '玉子とじラーメン 650円(大盛800円)' | |
echo '玉子とじ担々麺 800円(大盛980円)' | |
echo 'もやしそば 750円(大盛980円)' | |
echo 'ワンタンメン 750円(大盛980円)' | |
echo '叉焼麺 800円(大盛980円)' | |
echo '天津麺 750円(大盛980円)' | |
echo '五目そば 750円(大盛980円)' | |
echo '酸辣湯麺 850円(大盛1000円)' |
NewerOlder