Skip to content

Instantly share code, notes, and snippets.

View greta.txt
Date: Mon, 13 Jul 2020 10:48:56 +0000
From: Greta Matuzevičiūtė <greta.matuzeviciute@fortismedia.net>
Subject: RE: Sponsored Guest Post on jpmens.net
X-Rspamd-Score: -1.20004
Hi there,
I got in touch a while back about the possibility of working together.
We’d be interested in publishing a guest article on jpmens.net. We have an
@jpmens
jpmens / Documentation.md
Created Jul 12, 2020 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)
View Documentation.md

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@jpmens
jpmens / ansible_inventory_plugin_example.py
Created May 27, 2020 — forked from srgvg/ansible_inventory_plugin_example.py
This is a boiler plate example that could be used to write an inventory plugin It shows the use case of retrieving data from a remote API, which might be a slow or costly action, you may want to cache. What needs to be initialized in Ansible to use a cache is shown, too.
View ansible_inventory_plugin_example.py
# This is a boiler plate example that could be used to write an inventory plugin.
# It shows the use case of retrieving data from a remote API, which might be a
# slow or costly action, you may want to cache.
# What needs to be initialized in Ansible to use a cache is shown, too.
# This example by by Serge van Ginderachter <serge@vanginderachter.be>
# Copyright (c) 2017 Ansible Project
# Copyright (c) 2020 Serge van Ginderachter <serge@vanginderachter.be>
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
View gist:7182cb833df3492397096419117098d5
; <<>> DiG 9.13.1 <<>> +dnssec +multiline @192.168.1.53 dlv.isc.org SOA +cd
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52654
;; flags: qr rd ra cd; QUERY: 1, ANSWER: 2, AUTHORITY: 3, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags: do; udp: 4096
View gist:3f6dcab41071d05935dd4bf69b4816a3
; <<>> DiG 9.13.1 <<>> +dnssec +multiline @8.8.8.8 dlv.isc.org SOA +cd
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7914
;; flags: qr rd ra cd; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags: do; udp: 512
@jpmens
jpmens / commands.md
Created Mar 4, 2020
Let's Encrypt grep
View commands.md

find my domain's serial in Let's Encrypt CAA file

grep "^serial $(openssl s_client -connect example.com:443 -showcerts </dev/null 2>/dev/null |
     openssl x509 -serial -noout  |
     cut -d= -f2 |
     tr '[A-Z]' '[a-z]')" caa-rechecking-incident-affected-serials.txt
@jpmens
jpmens / log.txt
Last active Feb 10, 2020
dhclient vs resolvconf: variables
View log.txt
dhclient
interface=em0
new_broadcast_address=172.16.23.255
new_dhcp_lease_time=10800
new_dhcp_message_type=5
new_dhcp_server_identifier=172.16.16.1
new_domain_name_servers=172.16.16.1
new_expiry=1580174627
new_ip_address=172.16.23.168
View i9.sh
#!/bin/sh
awx inventory create --name tw00 --organization Default
awx group create --name gr1 --inventory tw00
awx host create --name ho1 --inventory tw00
View ansible-freebsd-iface.txt
$ ifconfig
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=81009b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,VLAN_HWFILTER>
ether 08:00:27:a8:d9:50
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
em1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=81009b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,VLAN_HWFILTER>
ether 08:00:27:8b:23:19
View delsnaps.sh
#!/bin/sh
tmutil listlocalsnapshots / |
grep TimeMachine |
sed -e 's|^com\.apple\.TimeMachine\.||' -e 's|\.local.*||' |
while read snap; do tmutil deletelocalsnapshots $snap; done
You can’t perform that action at this time.