Skip to content

Instantly share code, notes, and snippets.

View seveas's full-sized avatar

Dennis Kaarsemaker seveas

View GitHub Profile
strangles $who with a doohicky mouse cord
pours hot grits down the front of $who's pants
beats $who senseless with a 50lb Unix manual
whacks $who with the cluebat
resizes $who's terminal to 40x24
drops a truckload of VAXen on $who
pulls out his louisville slugger and uses $who's head to break the homerun record
stabs $who
steals $who's mojo
holds $who to the floor and spanks him with a cat-o-nine-tails
color_0 = cf3c cf3c cf3c
color_1 = 0000 0000 0000
color_2 = 0000 0000 cccc
color_3 = 0000 cccc 0000
color_4 = dddd 0000 0000
color_5 = aaaa 0000 0000
color_6 = bbbb 0000 bbbb
color_7 = ffff aaaa 0000
color_8 = eeee dddd 2222
color_9 = 3333 dede 5555
@seveas
seveas / hpilo.py
Last active October 12, 2019 10:56
# (c) 2011-2013 Dennis Kaarsemaker <[email protected]>
# see COPYING for license details
# Test edit!
import os
import platform
import random
import re
import socket
import subprocess
@seveas
seveas / f5_ip_change.py
Created January 13, 2014 11:39
I need to change 600 IP addresses on F5 BIGI devices. This is cumbersome.
#!/usr/bin/python
################################################################################
# Script to process IP address changes on F5 BIGIP v10 and v11 devices. You
# cannot change IP addresses, so you must delete and re-add nodes. This script
# does exactly that, in a limited way.
#
# Caveats and limitations:
# - Nodes will get recreated in the 'Common' partition even if they were in
# other partitions. This is on purpose, because this is what I needed
branch = repo.ref('heads/gh-pages')
parent = repo.commit(branch.object.sha)
files = os.listdir('.')
blobs = []
for (dir, _, files) in os.walk('.'):
dir = dir[2:]
for file in files:
with open(os.path.join(dir, file)) as fd:
sha = repo.create_blob(fd.read().encode('base64'), "base64")
sudo apt-get build-dep festival
cd /tmp
apt-get source festival
wget https://aur.archlinux.org/packages/fe/festival-patched-hts/festival-patched-hts.tar.gz
tar xf festival-patched-hts.tar.gz
cp festival-patched-hts/*hts* festival-2.1~release/debian/patches/
cd festival-2.1~release/debian/patches/
ls | grep hts >> series
cd ../../
dpkg-buildpackage -rfakeroot
From 4a9745b590c9912d5e1b6e139f0dcbe374196fad Mon Sep 17 00:00:00 2001
From: Dennis Kaarsemaker <[email protected]>
Date: Thu, 8 Nov 2012 10:07:57 +0100
Subject: [PATCH] Add a start delay option that allows healthchecks to run
early
When restarting haproxy with the -sf/-st options, the restart is almost
seamless. The problem is that all state (admin down via socket,
monitoring down) gets lost. This delay allows for health checks to
happen before the listeners start and the older process gets killed,
#include <stdio.h>
#include <string.h>
#include <unistd.h>
void print_cmdline(void);
int main(int argc, char **argv) {
char *end;
print_cmdline();
end = argv[argc-1] + strlen(argv[argc-1]);
sbin/MAKEDEV
sbin/mount.crypt_LUKS
sbin/mount.crypto_LUKS
sbin/umount.crypt_LUKS
sbin/umount.crypto_LUKS
usr/bin/AClock
usr/bin/ANTS
usr/bin/ASFileBrowser
usr/bin/ASRun
usr/bin/ASWallpaper
#!/usr/bin/python
#
# List all files that have ever been committed in this repository, in any
# commit in any branch.
import pygit2
import stat
def list_all_files(repo_path):
repo = pygit2.Repository(repo_path)