Skip to content

Instantly share code, notes, and snippets.

View skaag's full-sized avatar
🏠
Working from home

Aric Fedida skaag

🏠
Working from home
View GitHub Profile
@skaag
skaag / gist:df101bc975ba14e7114e6b6f1ee5f189
Created June 25, 2019 21:15
Cache Microsoft and Apple Updates
# Cache windows and apple updates in Squid:
refresh_pattern -i windowsupdate.com/.*\.(cab|exe|ms[i|u|f|p]|[ap]sf|wm[v|a]|dat|zip|psf) 43200 80% 129600 reload-into-ims;
refresh_pattern -i microsoft.com/.*\.(cab|exe|ms[i|u|f|p]|[ap]sf|wm[v|a]|dat|zip|psf) 43200 80% 129600 reload-into-ims;
refresh_pattern -i windows.com/.*\.(cab|exe|ms[i|u|f|p]|[ap]sf|wm[v|a]|dat|zip|psf) 43200 80% 129600 reload-into-ims;
refresh_pattern -i microsoft.com.akadns.net/.*\.(cab|exe|ms[i|u|f|p]|[ap]sf|wm[v|a]|dat|zip|psf) 43200 80% 129600 reload-into-ims;
refresh_pattern -i deploy.akamaitechnologies.com/.*\.(cab|exe|ms[i|u|f|p]|[ap]sf|wm[v|a]|dat|zip|psf) 43200 80% 129600 reload-into-ims;
refresh_pattern -i ([^.]+.|)(download|adcdownload).(apple.|)com/.*\.(pkg|dmg) 4320 100% 43200 reload-into-ims;
I, [2018-08-10T01:20:52.963033 #8288] INFO -- : [diaspora:web] sleeping for :start_grace 2.5
I, [2018-08-10T01:20:55.463482 #8288] INFO -- : [diaspora:web] load_external_pid_file: pid_file found, but process <8521> not found
E, [2018-08-10T01:20:55.463635 #8288] ERROR -- : [diaspora:web] exit status 1, process <8521> (from /home/diaspora/diaspora/tmp/pids/web.pid) was not found; ensure that the pid_file is being updated correctly (you should check the process logs ["/home/diaspora/diaspora/log/eye_processes_stdout.log", "/home/diaspora/diaspora/log/eye_processes_stderr.log"])
E, [2018-08-10T01:20:55.463684 #8288] ERROR -- : [diaspora:web] process <> failed to start (:not_really_running)
I, [2018-08-10T01:20:55.464061 #8288] INFO -- : [diaspora:web] switch :crashed [:starting => :down] crashed
I, [2018-08-10T01:20:55.464457 #8288] INFO -- : [diaspora:web] schedule :check_crash (crashed)
I, [2018-08-10T01:20:55.464534 #8288] INFO -- : [diaspora:web] <= restore
I, [2018-08-10T01:20:55.464576 #8288] INFO --
@skaag
skaag / to-mono.sh
Created August 29, 2017 18:36
Ghostscript recipe to convert a PDF to mono
gs -o $1-mono.pdf \
-sDEVICE=pdfwrite \
-r600 \
-dCompatibilityLevel=1.4 \
-dPDFSETTINGS=/screen \
-dEmbedAllFonts=true \
-dSubsetFonts=true \
-sColorConversionStrategy=/Mono \
-sColorConversionStrategyForImages=/Mono \
-c "/osetrgbcolor {/setrgbcolor} bind def /setrgbcolor {pop [0 0 0] osetrgbcolor} def" \
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 202 0 0 eth0
0.0.0.0 192.168.1.1 0.0.0.0 UG 303 0 0 wlan0
192.168.1.0 0.0.0.0 255.255.255.0 U 303 0 0 wlan0
192.168.1.1 0.0.0.0 255.255.255.255 UH 202 0 0 eth0
192.168.30.0 0.0.0.0 255.255.255.0 U 202 0 0 eth0
apt-get install -y xinetd
wget skaag.net/observium_agent_xinetd -O /etc/xinetd.d/observium_agent_xinetd
wget skaag.net/observium_agent -O /usr/bin/observium_agent
chmod +x /usr/bin/observium_agent
mkdir -p /usr/lib/observium_agent/local
service xinetd restart
zmprov gacf | grep zimbraMtaRestriction
zimbraMtaRestriction: reject_invalid_helo_hostname
zimbraMtaRestriction: reject_non_fqdn_helo_hostname
zimbraMtaRestriction: reject_non_fqdn_sender
zimbraMtaRestriction: reject_unknown_reverse_client_hostname
zimbraMtaRestriction: reject_unknown_sender_domain
zimbraMtaRestriction: reject_unknown_helo_hostname
zimbraMtaRestriction: reject_rbl_client bl.spamcop.net
zimbraMtaRestriction: reject_rbl_client dnsbl.sorbs.net
zimbraMtaRestriction: reject_rbl_client b.barracudacentral.org
Aug 16 21:41:07 zimbra-us postfix/smtpd[15592]: warning: hostname net227.ntraweb.net does not resolve to address 94.156.93.227: Name or service not known
Aug 16 21:41:07 zimbra-us postfix/smtpd[15592]: connect from unknown[94.156.93.227]
Aug 16 21:41:08 zimbra-us postfix/smtpd[15592]: NOQUEUE: filter: RCPT from unknown[94.156.93.227]: <mortgage_rate_lock-aric=interwallet.com@bryce-dallashoward.net>: Sender address triggers FILTER smtp-amavis:[127.0.0.1]:10026; from=<mortgage_rate_lock-aric=interwallet.com@bryce-dallashoward.net> to=<aric@interwallet.com> proto=ESMTP helo=<mail.bryce-dallashoward.net>
Aug 16 21:41:08 zimbra-us postfix/smtpd[15592]: NOQUEUE: filter: RCPT from unknown[94.156.93.227]: <mortgage_rate_lock-aric=interwallet.com@bryce-dallashoward.net>: Sender address triggers FILTER smtp-amavis:[127.0.0.1]:10024; from=<mortgage_rate_lock-aric=interwallet.com@bryce-dallashoward.net> to=<aric@interwallet.com> proto=ESMTP helo=<mail.bryce-dallashoward.net>
Aug 16 21:41:08 zimbra-us postfix/smtpd[15592]
@skaag
skaag / interfaces
Created August 10, 2016 22:00
Guest (LXC) /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 148.251.156.130
netmask 255.255.255.248
post-up ip route add 148.251.126.177 dev eth0
post-up ip route add default via 148.251.126.177 dev eth0
pre-down ip route del default via 148.251.126.177 dev eth0
@skaag
skaag / interfaces
Created August 10, 2016 21:52
Proxmox 4.x /etc/network/interfaces
### Hetzner Online GmbH - installimage
# Loopback device:
auto lo
iface lo inet loopback
iface lo inet6 loopback
# device: eth0
auto eth0
iface eth0 inet static
address 148.251.126.177
# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
7 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up python-chardet (2.0.1-2build2) ...
Traceback (most recent call last):