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 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 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 github-release.sh
#!/bin/sh | |
### Github create release script | |
### This script requires following UNIX commands: | |
### - jq | |
### - file | |
### - curl | |
### - basename | |
### Those commands might not be installed on CI environment due to tiny OS package, | |
### So probably you need to install manually. |
View fumake
#!/bin/sh | |
MPATH=$PWD | |
MAKECOMMAND=$(which make) | |
if [ "${MAKECOMMAND}" = "" ]; then | |
echo "make command could't find in your \$PATH. Did you install it?" | |
exit 1 | |
fi |
View generate.sh
#!/bin/bash | |
set -eu | |
atexit() { | |
[[ -n $tmpdir ]] && rm -fr "$tmpdir" | |
[[ -n $sslconf ]] && rm -fr "$sslconf" | |
} | |
tmpdir=`mktemp -d` | |
sslconf=`mktemp` | |
trap atexit EXIT | |
trap 'trap - EXIT; atexit; exit -1' SIGHUP SIGINT SIGTERM |
NewerOlder