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
bogus-priv | |
no-resolv | |
server=1.1.1.1 | |
server=1.0.0.1 | |
server=2606:4700:4700::1111 | |
server=2606:4700:4700::1001 | |
local=/lan.aaronjwood.com/ | |
interface=br0 | |
bind-interfaces | |
expand-hosts |
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
$dev = (Get-PnpDevice -PresentOnly).Where{ $_.InstanceId -like $instanceId } | |
$vm = Get-VM $vmName | |
$locationPath = (Get-PnpDeviceProperty -KeyName DEVPKEY_Device_LocationPaths -InstanceId $dev.InstanceId).Data[0] | |
Disable-PnpDevice -InstanceId $dev.InstanceId -Confirm:$false | |
Dismount-VMHostAssignableDevice -LocationPath $locationPath -Force -Verbose | |
Add-VMAssignableDevice -VM $vm -LocationPath $locationPath -Verbose |
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
# Default policy to drop all incoming packets. | |
ip6tables -P INPUT DROP | |
ip6tables -P FORWARD DROP | |
# Accept incoming packets from localhost and LAN. | |
ip6tables -A INPUT -i lo -j ACCEPT -m comment --comment "Accept incoming loopback" | |
ip6tables -A INPUT -i $BRIDGE -j ACCEPT -m comment --comment "Accept incoming LAN" | |
# Accept incoming packets from the WAN if the router initiated the connection. | |
ip6tables -A INPUT -i $WAN -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT -m comment --comment "Accept incoming established, related WAN" |
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
sysctl -w net.ipv6.conf.all.forwarding=1 | |
sysctl -w net.ipv6.conf.$WAN.accept_ra=2 |
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
net.bridge.bridge-nf-call-ip6tables = 0 | |
net.bridge.bridge-nf-call-iptables = 0 | |
net.bridge.bridge-nf-call-arptables = 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
# Default policy to drop all incoming packets. | |
iptables -P INPUT DROP | |
iptables -P FORWARD DROP | |
# Accept incoming packets from localhost and LAN. | |
iptables -A INPUT -i lo -j ACCEPT -m comment --comment "Accept incoming loopback" | |
iptables -A INPUT -i $BRIDGE -j ACCEPT -m comment --comment "Accept incoming LAN" | |
# Accept incoming packets from the WAN if the router initiated the connection. | |
iptables -A INPUT -i $WAN -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT -m comment --comment "Accept incoming established, related WAN" |
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
[Unit] | |
Description=Grafana | |
Requires=docker.service | |
After=docker.service | |
[Service] | |
Restart=always | |
ExecStartPre=-/usr/bin/docker pull grafana/grafana | |
ExecStart=/usr/bin/docker run --name grafana --user 1000 -p 3000:3000 -e "GF_AUTH_ANONYMOUS_ENABLED=true" -e "GF_AUTH_ANONYMOUS_ORG_NAME=Main Org." -v /home/aaron/grafana:/var/lib/grafana grafana/grafana | |
ExecStop=/usr/bin/docker stop grafana |
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
class LCA { | |
static class Node { | |
int data; | |
Node left, right; | |
Node(int item) { | |
data = item; | |
left = right = null; | |
} |
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
class Change { | |
static int countDP(int coins[], int cents) { | |
int[] table = new int[cents + 1]; | |
table[0] = 1; | |
for (int coin : coins) { | |
for (int j = coin; j <= cents; j++) { | |
table[j] += table[j - coin]; | |
} | |
} |
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
class HM<K, V> { | |
private static class HashNode<K, V> { | |
private HashNode<K, V> next; | |
private K key; | |
private V value; | |
HashNode(K key, V value) { | |
this.key = key; | |
this.value = value; |