This file contains hidden or 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
// keepDoingSomething will keep trying to doSomething() until either | |
// we get a result from doSomething() or the timeout expires | |
func keepDoingSomething() (bool, error) { | |
timeout := time.After(5 * time.Second) | |
tick := time.Tick(500 * time.Millisecond) | |
// Keep trying until we're timed out or got a result or got an error | |
for { | |
select { | |
// Got a timeout! fail with a timeout error | |
case <-timeout: |
This file contains hidden or 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 | |
### BEGIN INIT INFO | |
# Provides: pfclient | |
# Required-Start: $local_fs $remote_fs $network $time $syslog | |
# Required-Stop: $local_fs $remote_fs $network $time $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: planefinder.net ads-b decoder | |
# Description: pfclient decodes ADS-B data and shares to planefinder.net | |
### END INIT INFO |
This file contains hidden or 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 | |
# CloudFlare as Dynamic DNS | |
# From: https://letswp.io/cloudflare-as-dynamic-dns-raspberry-pi/ | |
# Based on: https://gist.github.com/benkulbertis/fff10759c2391b6618dd/ | |
# Original non-RPi article: https://phillymesh.net/2016/02/23/setting-up-dynamic-dns-for-your-registered-domain-through-cloudflare/ | |
# Update these with real values | |
auth_email="[email protected]" | |
auth_key="global_api_key_goes_here" | |
zone_name="example.com" |
This file contains hidden or 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
echo > /etc/pihole/local.list | |
chown root:root /etc/pihole/local.list | |
pihole restartdns |
This file contains hidden or 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 | |
sudo rm /etc/localtime | |
sudo ln -s /usr/share/zoneinfo/US/Central /etc/localtime | |
sudo rm /etc/timezone | |
echo "US/Central" | sudo tee /etc/timezone |
This file contains hidden or 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
# Plain OLD | |
iptables -t nat -A PREROUTING -s IP -p udp --dport 53 -j REDIRECT --to-port 5300 | |
ptables -t nat -A PREROUTING -s IP -p tdp --dport 53 -j REDIRECT --to-port 5300 | |
# IP Based DNS Redirection | |
ipset -N restricted nethash | |
iptables -t nat -A PREROUTING -m set --match-set restricted src -p udp --dport 53 -j REDIRECT --to-port 5300 | |
iptables -t nat -A PREROUTING -m set --match-set restricted src -p tcp --dport 53 -j REDIRECT --to-port 5300 | |
ipset -A restricted IP |
This file contains hidden or 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
<VirtualHost *:80> | |
ServerName proxy.jpits.us | |
SSLProxyEngine on | |
ProxyRequests Off | |
ProxyPreserveHost on # Optional, may resolve login issues. | |
<Proxy *> | |
Order allow,deny | |
Allow from All | |
</Proxy> | |
ProxyPass / https://www.google.com/ |
This file contains hidden or 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
chronometer:x:1002:1002:,,,:/home/chronometer:/bin/bash | |
padd:x:1002:1002:,,,:/home/chronometer:/bin/bash |
This file contains hidden or 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
<div> | |
<div class="container"> | |
<div class="row app-banner-padding app-banner "> | |
<div class="col-md-12 text-center"> | |
<img src="https://contacts.zoho.com/file?exp=10&t=org&ID=663860804" align="center" width="200"> | |
</div> | |
</div> | |
</div> | |
</div> |
This file contains hidden or 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
### INSTALLATION(S) | |
# IPSET | |
* * * * * /sbin/ipset save > /etc/ipsetrules.save | |
@reboot /sbin/ipset restore -! < /etc/ipsetrules.save | |
## IPTABLES PERSISTENT | |
# 1. apt update | |
# 2. apt install iptables-persistent | |
# 3. systemctl enable netfilter-persistent | |
# 4. Add your rules | |
# 5. invoke-rc.d netfilter-persistent save |
OlderNewer