Skip to content

Instantly share code, notes, and snippets.

View ekollof's full-sized avatar
💭
All my repos have moved to https://git.hackerheaven.org/ekollof

Emiel Kollof ekollof

💭
All my repos have moved to https://git.hackerheaven.org/ekollof
View GitHub Profile
@ekollof
ekollof / planmon.py
Created June 3, 2022 11:28
Python script that checks plans with finger
#!/usr/bin/env python3
import sys
import os
import socket
import hashlib
import subprocess
CONFIG=os.path.expanduser("~/.config/planmon/config")
CACHEDIR=os.path.expanduser("~/.cache/planmon")
@ekollof
ekollof / sshfp.yml
Created January 30, 2020 12:40
ansible playbook getting/registering sshfp records with cloudflare
- name: get SSHFP records
shell: "ssh-keygen -r {{ ansible_nodename }} | awk '{print $4, $5, $6}'"
register: sshfp_entries
- name: Register SSHFP with CloudFlare
cloudflare_dns:
zone: "hackerheaven.org"
record: "{{ ansible_hostname }}"
type: SSHFP
account_email: "{{ cloudflare_email }}"
@ekollof
ekollof / smtpd.conf
Created November 18, 2019 22:33
my opensmtpd config
pki mail-ng.hackerheaven.org cert "/etc/ssl/mail-ng.hackerheaven.org.fullchain.pem"
pki mail-ng.hackerheaven.org key "/etc/ssl/private/mail-ng.hackerheaven.org.key"
filter check_dyndns phase connect match rdns regex { '.*\.dyn\..*', '.*\.dsl\..*' } \
disconnect "550 no residential connections"
# filter check_rdns phase connect match !rdns \
# disconnect "550 no rDNS is so 80s"
#filter check_fcrdns phase connect match !fcrdns \
@ekollof
ekollof / PKGBUILD
Last active December 13, 2019 14:52
libxft PKGBUILD with unicode-color fixes
# Maintainer: Andreas Radke <[email protected]>
# Maintainer: Jan de Groot <[email protected]>
pkgname=libxft
pkgver=2.3.3
pkgrel=1
pkgdesc="FreeType-based font drawing library for X"
arch=('x86_64')
license=('custom')
url="https://xorg.freedesktop.org/"
@ekollof
ekollof / Mastodon.py stats example
Last active October 2, 2018 18:33
Example getting stats from mastodon
#!/usr/bin/env python3.7
import sys
from mastodon import Mastodon
from pprint import pprint
from urllib.parse import urlparse
def main():
@ekollof
ekollof / gist:934b7a3a5ceadd2d3b24b9e528209a53
Last active June 27, 2018 11:18
Proxy support for linotp-pam
diff --git a/src/pam_linotp.c b/src/pam_linotp.c
index 48e77c2..23f6cb9 100644
--- a/src/pam_linotp.c
+++ b/src/pam_linotp.c
@@ -120,6 +120,7 @@ int debugflag = 0;
/*
config options which could be set in the pam configuration:
url=http://localhost:5001/validate/simplecheck
+ proxy=http://proxy.location:3128/
nosslhostnameverify

Keybase proof

I hereby claim:

  • I am ekollof on github.
  • I am andrath (https://keybase.io/andrath) on keybase.
  • I have a public key whose fingerprint is D9B3 6EC6 350C DE3A FC6E 55DF E4BC 9508 EC4A 4094

To claim this, I am signing this object:

@ekollof
ekollof / Dynamic python interpreter selection
Created July 28, 2016 11:29
Find python interpreter and use it (useful when mixing Linux/BSD/Solaris/etc hosts)
- hosts: all
gather_facts: false
tasks:
- raw: which {{item}}
register: mypython
ignore_errors: True
with_items:
- python
- python2
- python2.7
root@hh-management01:~ # salt-cloud --profile hh-db hh-db01
[INFO ] salt-cloud starting
[INFO ] Creating Cloud VM hh-db01
[INFO ] found private IPv4 interface for "10.129.16.64"
[INFO ] found public IPv4 interface for "95.85.10.213"
[INFO ] found public IPv6 interface for "2A03:B0C0:0000:1010:0000:0000:035F:D001"
[INFO ] Rendering deploy script: /usr/local/etc/salt/cloud.deploy.d/bootstrap-salt.sh
Warning: Permanently added '95.85.10.213' (ECDSA) to the list of known hosts.
Fri Jul 1 09:14:19 UTC 2016
Warning: Permanently added '95.85.10.213' (ECDSA) to the list of known hosts.