Skip to content

Instantly share code, notes, and snippets.

View Duologic's full-sized avatar

Jeroen Op 't Eynde Duologic

View GitHub Profile
@Duologic
Duologic / r53updater.py
Last active August 29, 2015 14:01
r53updater.py
from boto import route53
class R53Updater(object):
"""
Example for A record:
r53 = R53Updater()
r53.connect()
records = r53.find_record('example.org')
new_ip_list = ['1.2.3.4', '4.3.2.1']
@Duologic
Duologic / .vimrc
Last active August 29, 2015 14:01
" .vimrc
" For multi-byte character support (CJK support, for example):
" set fileencodings=ucs-bom,utf-8,cp936,big5,euc-jp,euc-kr,gb18030,latin1
set visualbell
set wildmenu
" set cursorline
set tabstop=4
set shiftwidth=4
set expandtab
set smarttab
# .tmux.conf [18/202]
## General settings
unbind C-b
set -g prefix C-a
set -g history-limit 5000
set -g bell-action any
set -g display-panes-time 2000
set -g base-index 0
set -g set-titles on
set -g set-titles-string "#H.tmux.#I.#W"
#### COLOUR (Solarized 256)
# default statusbar colors
set-option -g status-bg colour235 #base02
set-option -g status-fg colour136 #yellow
set-option -g status-attr default
# default window title colors
set-window-option -g window-status-fg colour244 #base0
set-window-option -g window-status-bg default
#set-window-option -g window-status-attr dim
@Duologic
Duologic / .zshrc
Last active August 29, 2015 14:01
# stop messages
stty -ixon
# some zsh variables
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
DART=$'\u25ba'
GITUSER=`git config user.name`
#!/bin/sh
#
# ~/.xinitrc
#
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
pointer = 1 2 3 5 4 6 7 8 9 10 11 12
keycode 94 = 0x00b1 0x00a7
URxvt.depth: 32
URxvt.foreground: #000000
URxvt.background: #ddd9c3
URxvt.colorIT: #87af5f
URxvt.colorBD: #666666
URxvt.colorUL: #87afd7
URxvt.perl-ext-common: default,matcher
URxvt.url-launcher: /usr/bin/chromium
URxvt.matcher.button: 1
URxvt.url-select.underline: true
@Duologic
Duologic / parse_jsonlog.py
Created June 2, 2014 11:42
Quick and dirty json to csv log parser
import csv
import sys
import json
import argparse
import datetime
from dateutil import parser as dateparser
parser = argparse.ArgumentParser()
parser.add_argument('logfiles', metavar='N', nargs='+')
@Duologic
Duologic / loadconfig.py
Created March 18, 2015 14:27
Load Cabot env-file into Python
import os, pickle
settings_dir = os.path.dirname(__file__)
PROJECT_ROOT = os.path.abspath(os.path.dirname(settings_dir))
def readenvfile(filename):
if not os.path.exists(filename):
raise IOError("file {} not found".format(filename))
command = 'export $(cat {}|grep -v -e "^#"|xargs)'.format(filename)