Skip to content

Instantly share code, notes, and snippets.

@ngoue
ngoue / log_rotation.sh
Created December 11, 2015 22:39
Bash Log Rotation - Mac OSX
#! /bin/bash
##
# Log rotation script
#
# Author: Jordan Gardner (jordanthomasg@gmail.com)
# Version: 1.0
# Last Revision: 12/11/2015
#
# Copyright (c) 2015 Jordan Gardner
@ngoue
ngoue / update-remotes.py
Created February 16, 2017 20:15
Python script to change all the local remotes on my system to use my new GitHub username
#! /usr/bin/env python3
__doc__ = '''
Update all local repositories with new urls after
changing your GitHub username.
'''
import os, sys, subprocess, re
SEARCH_PATH = "/path/to/search"

Keybase proof

I hereby claim:

  • I am ngoue on github.
  • I am mcjoejoe (https://keybase.io/mcjoejoe) on keybase.
  • I have a public key whose fingerprint is 1B23 2632 5812 8926 63C9 57BF B56A 9742 3E74 821C

To claim this, I am signing this object:

from time import sleep
import psycopg2
CONN_INFO = {
'host': '',
'port': 5432,
'dbname': '',
'user': '',
'password': '',
@ngoue
ngoue / dynamic_dns_route53.py
Last active November 22, 2021 23:06
Dynamic DNS with Route53
#! /usr/bin/env python3
"""
Dynamic DNS - Route53
Check the current IP address for this device and compare it with the DNS record
in Route53. If it's different, update the DNS record!
"""
import logging