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
# 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 | |
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 -x | |
N=$1; shift | |
if [ -z "$N" -o -z "$1" ]; then | |
cat <<_ | |
Usage: $0 N COMMAND | |
_ | |
exit 1 | |
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
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 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 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
def self.postprocess(id) | |
Measurement.find(id).postprocess! | |
end | |
def postprocess! | |
process_start! | |
ImagesPostProcess.inspector_post_process("/demo/measurements/#{id}") | |
process_end! | |
end |
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
#!/usr/bin/env ruby | |
require 'base64' | |
require 'openssl' | |
require 'digest/sha1' | |
def ask(prompt) | |
STDOUT.print "#{prompt}: " | |
readline.strip | |
end |
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
safe do | |
local :path => "backup1" | |
tar do | |
archive "a1", :files => "some-directory-to-backup" | |
end | |
end | |
safe do |
NewerOlder