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
# if you've made any local changes, commit them first | |
git commit -a -m "changed some things" | |
git remote add benbrown https://github.com/benbrown/shuttlecraft | |
git fetch benbrown | |
git checkout benbrown/benbrown/feedinbox | |
# Save the branch so you can move to it later if you want | |
git checkout -b benbrown/feedinbox |
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
# File location: /etc/udev/rules.d/90-libvirt-usb.rules | |
ACTION=="bind", \ | |
SUBSYSTEM=="usb", \ | |
ENV{ID_VENDOR_ID}=="6b62", \ | |
ENV{ID_MODEL_ID}=="6869", \ | |
RUN+="/usr/local/bin/kvm-udev attach <domain>" | |
ACTION=="remove", \ | |
SUBSYSTEM=="usb", \ | |
ENV{ID_VENDOR_ID}=="6b62", \ | |
ENV{ID_MODEL_ID}=="6869", \ |
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/sh | |
[ "$VERBOSITY" = 1 ] && set -x | |
[ "$ADDRFAM" = meta ] && exit 0 | |
add_master() | |
{ | |
# Return if $BOND_MASTER is already a bonding interface. | |
[ -f "/sys/class/net/$BOND_MASTER/bonding/slaves" ] && return |
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 | |
# requires that imagemagick and wkhtmltopdf are installed | |
mkdir -p progress | |
git checkout master | |
mkhtmltoimage --crop-w 1920 --crop-h 1080 https://nickpegg.com progress/0000.png | |
count=0 |
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 | |
set -x | |
set -e | |
# This sets up QoS using HTB, which is a simplified algorithm. How it works is | |
# that I set up three classes, each class gets a guaranteed rate ('rate') and | |
# a maximum-usable rate ('ceil'). The ceiling is set to my uplink rate, so | |
# any class can use the full pipe assuming no better class trumps it. | |
# | |
# The classes are: |
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/sh | |
while true; do | |
echo "DERP" | |
sleep 60 | |
done |
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
interface br0 | |
{ | |
AdvSendAdvert on; | |
prefix $ROUTED_64 | |
{ | |
}; | |
}; |
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
# The loopback network interface | |
auto lo | |
iface lo inet loopback | |
# outside | |
allow-hotplug eth0 | |
iface eth0 inet dhcp | |
hwaddress ether AA:BB:CC:DD:EE:FF | |
dns-search home.nickpegg.com nickpegg.com | |
dns-nameservers 8.8.8.8 8.8.4.4 |
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
*filter | |
:INPUT DROP [0:0] | |
:FORWARD DROP [0:0] | |
:OUTPUT ACCEPT [0:0] | |
-A INPUT -i lo -j ACCEPT | |
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT | |
-A INPUT -p ipv6-icmp -m icmp6 --icmpv6-type echo-request -j ACCEPT | |
-A INPUT -p ipv6-icmp -m icmp6 --icmpv6-type destination-unreachable -j ACCEPT | |
-A INPUT -i br0 -p ipv6-icmp -m icmp6 --icmpv6-type neighbour-solicitation -j ACCEPT | |
-A INPUT -i br0 -p ipv6-icmp -m icmp6 --icmpv6-type neighbour-advertisement -j ACCEPT |
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
irb(main):001:0> foo = 'hi there' | |
=> "hi there" | |
irb(main):002:0> thing = :"#{foo}" | |
=> :"hi there" | |
irb(main):003:0> thing | |
=> :"hi there" | |
irb(main):004:0> foo = 'hi_there' | |
=> "hi_there" | |
irb(main):005:0> thing = :"#{foo}" | |
=> :hi_there |
NewerOlder