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 / 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]: <[email protected]>: Sender address triggers FILTER smtp-amavis:[127.0.0.1]:10026; from=<[email protected]> to=<[email protected]> 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]: <[email protected]>: Sender address triggers FILTER smtp-amavis:[127.0.0.1]:10024; from=<[email protected]> to=<[email protected]> 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):
ii dh-python 1.20140128-1ubuntu8.2 all Debian helper tools for packaging Python libraries and applications
ii libpython-stdlib:amd64 2.7.5-5ubuntu3 amd64 interactive high-level object-oriented language (default python version)
ii libpython2.7:amd64 2.7.6-8ubuntu0.2 amd64 Shared Python runtime library (version 2.7)
ii libpython2.7-minimal:amd64 2.7.6-8ubuntu0.2 amd64 Minimal subset of the Python language (version 2.7)
ii libpython2.7-stdlib:amd64 2.7.6-8ubuntu0.2 amd64 Interactive high-level object-oriented language (standard library, version 2.7)
ii libpython3-dev:amd64 3.4.0-0ubuntu2 amd64 header files and a static library for Python (default)
ii libpython3-stdlib:amd64 3.4.0-0ubuntu2 amd64 interactive high-level object-oriented language (default python3 version)
ii libpyth
CREATE KEYSPACE bids WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };
CREATE TABLE bids.bid_data (url varchar primary key, impressions bigint, bid_request_count bigint, response_200 bigint, response_204 bigint, bid_rate double, win_rate double, avergae_encounter_rate double);
CREATE INDEX ON bids.bid_data(impressions);
CREATE INDEX ON bids.bid_data(bid_request_count);
CREATE INDEX ON bids.bid_data(response_200);
CREATE INDEX ON bids.bid_data(response_204);
CREATE INDEX ON bids.bid_data(bid_rate);
CREATE INDEX ON bids.bid_data(win_rate);