This file contains hidden or 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 bash | |
god(){ | |
mkdir -p /tmp/god | |
(cd /tmp/god && go mod init god &> /dev/null) | |
for repo in $@; do | |
(cd /tmp/god && GOPROXY=${GOPROXY:-https://goproxy.cn,direct} go get $repo) | |
done | |
} | |
god $@ |
This file contains hidden or 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 php | |
<?php | |
$usage = "usage:\n\t" . $argv[0] . " <path_to_json_file>\n\t<pipe_json_string> | " . $argv[0] . " -\n"; | |
function from_camel_case($input) { | |
preg_match_all('!([A-Z][A-Z0-9]*(?=$|[A-Z][a-z0-9])|[A-Za-z][a-z0-9]+)!', $input, $matches); | |
$ret = $matches[0]; | |
foreach ($ret as &$match) { | |
$match = $match == strtoupper($match) ? strtolower($match) : lcfirst($match); | |
} |
This file contains hidden or 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 dhcp | |
import ( | |
"io" | |
"math/rand" | |
"net" | |
"time" | |
"github.com/golang/glog" | |
"github.com/google/gopacket" |