Skip to content

Instantly share code, notes, and snippets.

@chadsr
chadsr / whitelist.txt
Created March 13, 2024 13:02
Domain Whitelist
0.client-channel.google.com
1drv.com
2.android.pool.ntp.org
akamaihd.net
akamaitechnologies.com
akamaized.net
amazonaws.com
android.clients.google.com
api.ipify.org
api.rlje.net
@chadsr
chadsr / set.go
Created August 26, 2022 09:01 — forked from bgadrian/set.go
How to implement a simple set data structure in golang
type Set struct {
list map[int]struct{} //empty structs occupy 0 memory
}
func (s *Set) Has(v int) bool {
_, ok := s.list[v]
return ok
}
@chadsr
chadsr / 10-redirect-dns.sh
Last active April 20, 2022 15:01
Redirect DNS traffic with iptables
#!/bin/sh
# ipv4 address of the DNS server to redirect queries to
IPV4_DNS_IP="192.168.1.2"
# Separate ipv4 ranges to apply masquerading. Separated with spaces, e.g. "192.168.1.1-192.168.1.254 192.168.2.1-192.168.2.254"
IPV4_RANGES="192.168.1.1-192.168.1.254"
# Interfaces to apply prerouting rules to. Separated with spaces, e.g. "br0 br1"
INTERFACES="br0"
@chadsr
chadsr / blocklist.txt
Last active March 13, 2024 13:14
PiHole Aggregated Blocklist
https://blocklistproject.github.io/Lists/abuse.txt
https://blocklistproject.github.io/Lists/ads.txt
https://blocklistproject.github.io/Lists/fraud.txt
https://blocklistproject.github.io/Lists/malware.txt
https://blocklistproject.github.io/Lists/phishing.txt
https://blocklistproject.github.io/Lists/ransomware.txt
https://blocklistproject.github.io/Lists/redirect.txt
https://blocklistproject.github.io/Lists/scam.txt
https://blocklistproject.github.io/Lists/tiktok.txt
https://blocklistproject.github.io/Lists/tracking.txt
@chadsr
chadsr / end.gcode
Last active May 8, 2023 00:58
Creality Ender 3 S1 Start/End G-Code
G91 ;Relative positioning
G1 E-2 F2700 ;Retract a bit
G1 E-2 Z0.2 F2400 ;Retract and raise Z
G1 X5 Y5 F3000 ;Wipe out
G1 Z80 ;Raise Z more, to avoid hitting camera
G90 ;Absolute positioning
G1 X0 Y{machine_depth} ;Present print
M106 S0 ;Turn-off fan
M104 S0 ;Turn-off hotend
@chadsr
chadsr / Verifying my Peepeth
Created July 31, 2019 13:40
Verifying my Peepeth
Verifying my identity on Peepeth.com 0xed3a0dbf6a50ca9ecd1a901eaf28c6eca5a881ed
@chadsr
chadsr / keybase.md
Last active September 13, 2017 09:34
Keybase

Keybase proof

I hereby claim:

  • I am chadsr on github.
  • I am chadsr (https://keybase.io/chadsr) on keybase.
  • I have a public key ASCdOspA644ipcpV7zapOY7wgfuzBWfGvpFAdGmPtfDNzAo

To claim this, I am signing this object: