Skip to content

Instantly share code, notes, and snippets.

View sbeyer's full-sized avatar
🐐

Stephan Beyer sbeyer

🐐
View GitHub Profile
@pfrazee
pfrazee / link-checker.js
Created September 17, 2016 20:02
Quick link-checker script for Jekyll sites
@rbock
rbock / gist:57e49e477ce7cee6182b
Created September 10, 2015 19:13
replace include guards
#!/usr/bin/env python
import sys
import re
def convert(name):
s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name)
s2 = re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).upper()
return re.sub('[./_]+', '_', s2)
@desyncr
desyncr / inittab
Last active June 21, 2016 11:51 — forked from jonjensen/kill-large-processes.pl
Small Perl script to monitor and kill processes that are using too much memory or CPU.
# Example inittab entry (/etc/inittab)
# this will create a daemonized process which init will watch and respawn as needed
1001::respawn:/usr/bin/perl /usr/local/bin/kill-large-processes.pl
@Turin86
Turin86 / mbox_send.py
Last active October 3, 2016 23:47 — forked from wojdyr/mbox_send.py
A Python script that (re-)sends all messages in mbox files with From/To/Cc/Bcc as specified in the messages headers
#!/usr/bin/env python
"""\
A command-line utility that can (re)send all messages in an mbox file
to a specific email address, with options for controlling the rate at
which they are sent, etc.
"""
# I got this script from Robin Dunn a few years ago, see
# https://github.com/wojdyr/fityk/wiki/MigrationToGoogleGroups
@jonjensen
jonjensen / kill-large-processes.pl
Created August 30, 2012 20:52
Script to automatically kill large processes
#!/usr/local/bin/perl
use strict;
use warnings;
use Proc::ProcessTable;
my $table = Proc::ProcessTable->new;
for my $process (@{$table->table}) {
# skip root processes