Skip to content

Instantly share code, notes, and snippets.

@zachfi
zachfi / gist:e0dee773b657b41f3fe9
Created November 25, 2014 05:34
Gandi DNS Update Script
#! /usr/local/bin/python
import xmlrpclib
import ConfigParser
import os
from sys import exit
class GandiDomain():
def __init__(self, apikey, domain):
@zachfi
zachfi / gist:d1b53a6a3566560dd60a
Created January 12, 2015 15:19
Gitolite keys from LDAP
#! /usr/bin/env python
from pyldap import PyLDAP
from config import get_option, load_config
from os import mkdir
from os.path import isdir
def main():
opt, users = get_option()
@zachfi
zachfi / gist:01012b81fc260657703a
Last active August 29, 2015 14:24
rfc2307bis LDAP Schema Replacement LDIF
dn: cn={3}nis,cn=schema,cn=config
changetype: modify
replace: olcAttributeTypes
olcAttributeTypes: ( 1.3.6.1.1.1.1.2 NAME 'gecos'
DESC 'The GECOS field; the common name'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
olcAttributeTypes: ( 1.3.6.1.1.1.1.3 NAME 'homeDirectory'
DESC 'The absolute path to the home directory'
import requests
import logging
class PushoverLogHandler(logging.Handler):
PRIORITIES = {
'NOTSET': '-2',
'DEBUG': '-2',
'INFO': '-1',
'WARNING': '-1',
@zachfi
zachfi / gist:4705648fc103937e66d55c3c4732f5ec
Created August 16, 2016 18:10
letsenncrypt_route53_dns_hook.py
#! /usr/bin/env python3
# ./letsencrypt.sh -c -d myhost.internal.example.com -t dns-01 -k 'letsenncrypt_dns_hook.py'
# Handles DNS record creation and destruction on a public zone for a private name to allow verification.
import logging
import sys
import boto3
import time
#! /usr/bin/env python3
# vim: set fileencoding=UTF-8
""" letsencrypt_dns_hook.py: Used as a hook script for dehydrated.sh during
validation for a given name to modify the route53 DNS records necessary to
provide proof of domain ownership.
"""
__author__ = "Zach Leslie"
__copyright__ = "Copyright 2016, OtoAnalytics"
Index: Makefile
===================================================================
--- Makefile (revision 432696)
+++ Makefile (working copy)
@@ -1,8 +1,8 @@
# $FreeBSD$
PORTNAME= facter
-PORTVERSION= 3.1.3
-PORTREVISION= 4
#! /usr/bin/env python3
import argparse
import os
import operator
import sys
def get_files(directory):
try:
basedir = os.path.expanduser(directory)

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

Index: Makefile
===================================================================
--- Makefile (revision 444810)
+++ Makefile (working copy)
@@ -2,6 +2,7 @@
PORTNAME= puppetserver
PORTVERSION= 2.7.2
+PORTREVISION= 1
CATEGORIES= sysutils java