Skip to content

Instantly share code, notes, and snippets.

@kadin2048
kadin2048 / crashlog.out
Created January 8, 2015 17:56
Virb Edit 2.8.0 on Mac OS X 10.9.5 Crash
Process: Garmin VIRB Edit [31839]
Path: /Applications/Garmin VIRB Edit.app/Contents/MacOS/Garmin VIRB Edit
Identifier: com.garmin.VIRBEdit
Version: 2.8.0 (2.8.0)
Code Type: X86-64 (Native)
Parent Process: launchd [170]
Responsible: Garmin VIRB Edit [31839]
User ID: 501
Date/Time: 2015-01-06 19:36:13.051 -0500
@kadin2048
kadin2048 / baserename.sh
Created January 14, 2015 19:04
Renames files that have the same basename but different extensions, e.g. 'somefile.avi', 'somefile.nfo', 'somefile.txt' to 'anotherfile.avi', 'anotherfile.nfo', etc.
#!/bin/sh
# From http://stackoverflow.com/questions/15585441/batch-renaming-multiple-files-with-different-extensions-linux-script
# first argument - basename of files to be moved
# second arguments - basename of destination files
if [ $# -ne 2 ]; then
echo "Two arguments required."
exit;
fi
@kadin2048
kadin2048 / crashlog.out
Created April 14, 2015 16:58
Garmin VIRB Edit 2.9.1 on MacOS 10.9.5 Crash
Process: Garmin VIRB Edit [1832]
Path: /Applications/Garmin VIRB Edit.app/Contents/MacOS/Garmin VIRB Edit
Identifier: com.garmin.VIRBEdit
Version: 2.9.1 (2910)
Code Type: X86-64 (Native)
Parent Process: launchd [170]
Responsible: Garmin VIRB Edit [1832]
User ID: 501
Date/Time: 2015-04-14 12:55:10.406 -0400
@kadin2048
kadin2048 / openscad_template.scad
Created January 21, 2016 05:23
OpenSCAD Complex Model Skeleton
// name
// author
// GLOBALS
prefix_varname = 10;
module myObject() {
difference() {
union() {
// primitives you want to ADD to the model go here
@kadin2048
kadin2048 / m2cache.py
Last active July 6, 2016 20:39 — forked from morrelinko/m2cache.py
Copy gradle store of libraries into .m2 local cache
import os
import shutil
gradle_cache_dir = '/Users/myusername/.gradle/caches/modules-2/files-2.1/'
maven_cache_dir = '/Users/myusername/.m2/repository/'
"""
Copy dependencies from the Gradle cache to the M2 cache
"""
packages = {}
@kadin2048
kadin2048 / sametimeToEml.py
Last active July 6, 2016 20:55
Convert IBM Sametime log directory to .eml files
#!/usr/bin/env python
# Take an IBM Sametime HTML log file, determine the date, and create
# an RFC-compliant email message from it, for importation into an MUA
#
# Usage: sametimetoeml.py inputfile.html
# Where inputfile.html is a Sametime log located in a dated folder
# (See readme for more useful suggestions.)
#
# Written for Python 2.6
#!/usr/bin/perl -w
# Blosxom Plugin: calendar
# Author: Todd Larason (jtl@molehill.org)
# Version: 0+1i
# Blosxom Home/Docs/Licensing: http://www.raelity.org/blosxom
# Categories plugin Home/Docs/Licensing:
# http://molelog.molehill.org/blox/Computers/Internet/Web/Blosxom/Calendar/
package calendar;
@kadin2048
kadin2048 / snmp_notes.md
Created October 14, 2021 18:51
Just some notes on an old SNMP monitor-and-graph project

Some Notes on SNMP Dashboarding

My SNMP "dashboard" consisted of three parts: one, a set of Round Robin Databases created with rrdtool; two, a set of shell scripts run frequently by cron to add new data to the databases; three, a set of less-frequently run scripts to generate the graph PNGs displayed on a web page.

Round Robin Databases

The empty Round Robin Databases need to be initialized first, before you can add data to them.

Tutorial here: https://oss.oetiker.ch/rrdtool/tut/rrd-beginners.en.html

@kadin2048
kadin2048 / CIMtoXML.java
Created November 2, 2021 05:12
Very old Java-based conversion utility for migrating CenterIM flat file logs to XML "Unified Log Format" logs used by Adium. Requires argv and xmlwriter libraries.
/** This program converts history files produced by CenterIM
* into "Unified Log Format" XML files used by Adium and some
* other instant messaging programs.
*
* Basic Usage:
* $ java CIMtoXML -i inputfile -d destdir -n localnickname
*
* Inputfile must be a CenterIM history file, located in
* the normal ~/.centerim/ hierarchy.
*
@kadin2048
kadin2048 / pidgintoeml.py
Created November 3, 2021 05:38
Turn a Pidgin HTML chatlog into a Thunderbird-compatible .eml file so that it can be imported into IMAP for archive purposes.
#!/usr/bin/env python
# Turn an Pidgin HTML chatlog into a Thunderbird-compatible .eml file
# so that it can be imported into Gmail for archive purposes.
#
# Syntax: $ python pidgintoeml.py pidginlogfile.html [outputfilename.eml]
#
# Version: 2011-09-28
#