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
#!/bin/bash -x | |
N=$1; shift | |
if [ -z "$N" -o -z "$1" ]; then | |
cat <<_ | |
Usage: $0 N COMMAND | |
_ | |
exit 1 | |
fi |
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
Postgres.app/Contents/MacOS/share/man/man1: | |
cjpeg.1 cs2cs.1 ecpg.1 pg_archivecleanup.1 pg_dump.1 pg_standby.1 postgres.1 reindexdb.1 | |
clusterdb.1 djpeg.1 geod.1 pg_basebackup.1 pg_dumpall.1 pg_test_fsync.1 postmaster.1 vacuumdb.1 | |
createdb.1 dropdb.1 initdb.1 pg_config.1 pg_receivexlog.1 pg_test_timing.1 proj.1 vacuumlo.1 | |
createlang.1 droplang.1 jpegtran.1 pg_controldata.1 pg_resetxlog.1 pg_upgrade.1 psql.1 wrjpgcom.1 | |
createuser.1 dropuser.1 oid2name.1 pg_ctl.1 pg_restore.1 pgbench.1 rdjpgcom.1 | |
Postgres93.app/Contents/MacOS/share/man/man1: | |
bmp2tiff.1 fax2ps.1 jpegtran.1 ras2tiff.1 sgi2tiff.1 tiff2ps.1 tiffcrop.1 tiffinfo.1 tiffsv.1 | |
cjpeg.1 fax2tiff.1 pal2 |
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
concern :v2 do | |
namespace :user do | |
resources :devices, only: [] do | |
resources :services, only: [:show, :update], controller: 'device_services' | |
resources :users, only: [] do | |
resources :services, only: [:show, :update], controller: 'device_user_services' | |
end | |
end | |
end | |
end |
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
<env:Envelope xmlns:lol0="http://ws.ottsso.singtel.com/clientauthws/" xmlns:lol1="http://ws.ottsso.singtel.com/commonottsso/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> | |
<env:Header> | |
</env:Header> | |
<env:Body> | |
<lol0:checkSSOUserInfoParams> | |
<lol0:header> | |
<lol1:clientId>SMARTHOMERCS</lol1:clientId> | |
<lol1:timeStamp>2014-09-25T14:31:03+02:00</lol1:timeStamp> | |
<lol1:signature>123</lol1:signature> | |
</lol0:header> |
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
root@8751e3abfcea:/# ps ax | |
PID TTY STAT TIME COMMAND | |
1 ? Ss+ 0:00 /sleep 60 | |
11 ? Z 0:00 [sleep] <defunct> | |
12 ? Ss 0:00 bash | |
27 ? R+ 0:00 ps ax |
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
# generic build rule | |
docker/build/%: docker/recipes/%/Dockerfile .dockerignore | |
@echo | |
@echo | |
@echo =================================== Building $@ | |
@echo | |
@echo | |
docker build --rm -t $* -f "$<" . | |
docker inspect --format="{{.Id}}" $* > $@ | |
@echo |
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
DOCKER="`which docker`" | |
function docker() | |
{ | |
if [ -n "$1" ]; then | |
local cmd="$1"; shift | |
if which "docker-$cmd" > /dev/null; then | |
"docker-$cmd" "$@" | |
else | |
"$DOCKER" "$cmd" "$@" |
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
#!/bin/bash | |
# cleanup all stopped containers | |
# except for those that have 'data' in the name | |
echo Removing all stopped non-data containers | |
docker ps --filter "status=exited" \ | |
| grep -v data \ | |
| grep -v ^CONTAINER \ | |
| awk '{print $1}' \ | |
| xargs docker rm |
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
#!/bin/bash | |
echo Removing all dangling images | |
docker images -q --filter "dangling=true" \ | |
| xargs docker rmi |
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
import serial, fcntl, struct, time | |
ser = serial.Serial( | |
port='/dev/ttyS4', | |
# baudrate=57600, | |
baudrate=9600, | |
timeout=1, | |
parity=serial.PARITY_NONE, | |
stopbits=serial.STOPBITS_ONE, | |
bytesize=serial.EIGHTBITS |