This file contains 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
# before corectld (mehserve redirect works) | |
r scrub-anchor "com.apple/*" all fragment reassemble | |
r anchor "com.apple/*" all | |
n nat-anchor "com.apple/*" all | |
n rdr-anchor "com.apple/*" all | |
com.apple r anchor "200.AirDrop/*" all | |
com.apple r anchor "250.ApplicationFirewall/*" all | |
com.apple/200.AirDrop/Bonjour r pass in on p2p0 inet6 proto udp from any to any port = 5353 keep state | |
com.apple/200.AirDrop/Bonjour r pass out on p2p0 proto tcp all flags any keep state |
This file contains 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 | |
function pfprint() { | |
if [ -n "$1" ];then | |
sudo pfctl -a "$2" -s"$1" 2>/dev/null | |
else | |
sudo pfctl -s"$1" 2>/dev/null | |
fi | |
} |
This file contains 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 |
This file contains 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 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 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 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 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 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 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 |
NewerOlder