Skip to content

Instantly share code, notes, and snippets.

View calendar-0-1i
#!/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 / m2cache.py
Last active Jul 6, 2016 — forked from morrelinko/m2cache.py
Copy gradle store of libraries into .m2 local cache
View m2cache.py
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 / openscad_template.scad
Created Jan 21, 2016
OpenSCAD Complex Model Skeleton
View openscad_template.scad
// name
// author
// GLOBALS
prefix_varname = 10;
module myObject() {
difference() {
union() {
// primitives you want to ADD to the model go here
@kadin2048
kadin2048 / crashlog.out
Created Apr 14, 2015
Garmin VIRB Edit 2.9.1 on MacOS 10.9.5 Crash
View crashlog.out
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 / baserename.sh
Created Jan 14, 2015
Renames files that have the same basename but different extensions, e.g. 'somefile.avi', 'somefile.nfo', 'somefile.txt' to 'anotherfile.avi', 'anotherfile.nfo', etc.
View baserename.sh
#!/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 Jan 8, 2015
Virb Edit 2.8.0 on Mac OS X 10.9.5 Crash
View crashlog.out
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 / sametimeToEml.py
Last active Jul 6, 2016
Convert IBM Sametime log directory to .eml files
View sametimeToEml.py
#!/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
@kadin2048
kadin2048 / emlToMbox.py
Last active Sep 4, 2021
Combine a directory of .eml files into a single Unix "mbox" file.
View emlToMbox.py
#!/usr/bin/env python
""" Converts a directory full of .eml files to a single Unix "mbox" file.
Accepts as input either an individual .eml file or a directory containing one
or more .eml files.
The output mbox will be created if it doesn't already exist. If it exists,
it will be appended to. There is no checking for duplicates, so use caution.
If duplicate filtering is desired, it could be added to addFileToMbox().
@kadin2048
kadin2048 / adiumToEml.py
Last active Jul 13, 2018
Convert Adium logs to .eml files
View adiumToEml.py
#!/usr/bin/env python
"""Convert Adium logs to RFC822-compliant '.eml' files that can be imported
into a mail program, uploaded to Gmail, etc.
Usage:
$ ./adiumToEml.py logfile [outputdir]
In most cases, you would probably want to call this from a script, e.g.
with `find` and `xargs` in order to run it on a bunch of logfiles.