Skip to content

Instantly share code, notes, and snippets.

View steveb's full-sized avatar

Steve Baker steveb

  • Red Hat
  • Wellington, New Zealand
View GitHub Profile
v 20130925 2
C 40000 40000 0 0 0 title-B.sym
C 46300 45100 1 90 0 resistor-2.sym
{
T 45950 45500 5 10 0 0 90 0 1
device=RESISTOR
T 46700 45800 5 10 1 1 180 0 1
refdes=R4
T 46400 45300 5 10 1 1 0 0 1
value=10k
### Keybase proof
I hereby claim:
* I am steveb on github.
* I am steveb (https://keybase.io/steveb) on keybase.
* I have a public key whose fingerprint is 8172 9177 B91C 6311 60E5 B2F2 0E06 3036 384E 42CD
To claim this, I am signing this object:
root@raspberrypi:/etc# cat network/interfaces
auto lo br0
iface lo inet loopback
pre-up iptables-restore < /etc/iptables.bridge.rules
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
--- /etc/squid3/squid.conf.orig 2013-02-25 11:31:23.839560066 +1300
+++ /etc/squid3/squid.conf 2013-02-26 09:07:15.388951441 +1300
@@ -702,6 +702,7 @@
#acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
#acl localnet src fc00::/7 # RFC 4193 local private network range
#acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
+acl localnet src 192.168.1.0/24
acl SSL_ports port 443
acl Safe_ports port 80 # http
--- squid.conf.orig 2013-02-25 11:31:23.839560066 +1300
+++ squid.conf 2013-02-25 11:42:02.713076606 +1300
@@ -702,6 +702,7 @@
#acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
#acl localnet src fc00::/7 # RFC 4193 local private network range
#acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
+acl localnet src 192.168.3.0/24
acl SSL_ports port 443
acl Safe_ports port 80 # http
*nat
-A POSTROUTING -o eth1 -j MASQUERADE
-A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to 192.168.1.200:3128
-A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128
COMMIT
*filter
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i eth1 -j DROP
...
pre-up iptables-restore < /etc/iptables.rules
...
auto eth0
iface eth0 inet static
address 192.168.3.254
network 192.168.3.0
netmask 255.255.255.0
broadcast 192.168.3.255
<stevebake> so, having written some templates it strikes me how user-unfriendly json is as a template format (no comments, no multiline)
<zaneb> not like xml
that's super friendly :D
<stevebake> there is XML, but we probably don't hate our users enough to do that
<zaneb> lol
JSON is a great format for APIs that machines talk across
pretty average for writing by hand, I agree
<stevebake> so I've been looking at YAML. Specifically thinking about a YAML format which parses to an identical structure to the current JSON
<zaneb> YAML is actually pretty cool
<stevebake> also JSON parses as valid YAML