June 9, 2015
Isao Yagi <[email protected]>
# Credit http://stackoverflow.com/a/2514279 | |
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r |
#!/bin/sh -eu | |
get_interface() | |
{ | |
route get 0.0.0.0 2>/dev/null | awk '/interface: /{print $2}' | |
} | |
get_ip() | |
{ | |
ifconfig -r $1 | awk '/inet /{print $2}' |
// This is a proxy config file that echos the requested server ip and port, by | |
// using nginx SSIs. Generated on: <!--# echo var="date_local" --> | |
function FindProxyForURL(url, host) { | |
// These values are derived from the current request's server/port. | |
var prefix = 'http://' + '<!--# echo var="arg_prefix" default="reachclient" -->'; | |
var proxyhost = '<!--# echo var="server_addr" default="dev.pondr.in" -->'; | |
var proxyport = '<!--# echo var="server_port" default="8000" -->' | |
if (url.substring(0, prefix.length) === prefix) { |
June 9, 2015
Isao Yagi <[email protected]>
#!/bin/sh -eu | |
# https://gist.github.com/isao/c742a5e8d76ad653ad89 | |
pid=$(adb shell 'ps' 2>&1 | grep com.ericsson.mediaroom.tv3client | awk '{print $2}') | |
if [[ -z $pid ]] | |
then | |
echo 'No process matching "com.ericsson.mediaroom.tv3client"' | |
exit 1 | |
fi |
git checkout \ | |
$(git show -s --pretty='%T' \ | |
$(git show-ref -d \ | |
$(git describe --abbrev=0) |\ # grab the most recent tag | |
tail -n1 |\ | |
awk '{print $1}'\ # dereference the commit hash it refers to | |
)\ # ... show the tree-hash it points at | |
) -- test # check that version's "test/" directory out into cwd | |
make test # if this fails, you should bump major, | |
# otherwise bump minor or patch. |
#!/bin/sh -eu | |
# config | |
# | |
email=REDACTED | |
token=$(security find-generic-password -ws 'Cloudflare API key' -a $email) | |
domain=REDACTED | |
subdomain=REDACTED | |
#!/bin/sh -eu | |
# | |
# This script runs MSBuild in a VMWare image from a Mac. It translates the Mac's | |
# current working directory to the corresponding Windows VM path to a shared | |
# directory. Any arguments to this script will be passed through to MSBuild. | |
# | |
# Usage: cd path/to/web.sln && msbuild-here.sh [args] | |
# | |
# https://gist.github.com/isao/d871a5b90e3505cc4151 |