Skip to content

Instantly share code, notes, and snippets.

View marcgeld's full-sized avatar

Marcus Gelderman marcgeld

View GitHub Profile
@marcgeld
marcgeld / run.tpl
Created August 23, 2023 11:23 — forked from efrecon/run.tpl
`docker inspect` template to regenerate the `docker run` command that created a container
docker run \
--name {{printf "%q" .Name}} \
{{- with .HostConfig}}
{{- if .Privileged}}
--privileged \
{{- end}}
{{- if .AutoRemove}}
--rm \
{{- end}}
{{- if .Runtime}}
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_adisk._tcp</type>
<txt-record>sys=waMa=0,adVF=0x100</txt-record>
<txt-record>dk0=adVN=Time Capsule,adVF=0x82</txt-record>
</service>
<service>
@marcgeld
marcgeld / calculate-payroll.scpt
Created September 18, 2018 20:23 — forked from reinvented/calculate-payroll.scpt
JXA Scripting of Numbers.app, using AJAX to calculate payroll deductions from a remote PHP script
Numbers = Application('Numbers');
Numbers.includeStandardAdditions = true
var table = Numbers.documents[0].sheets[0].tables[0]
var selectedRow = table.selectionRange().cells[0];
var hoursCellRow = selectedRow.row().address();
var weekEndingCell = table.ranges["B" + hoursCellRow + ":B" + hoursCellRow].cells[0];
var nameCell = table.ranges["C" + hoursCellRow + ":C" + hoursCellRow].cells[0];
@marcgeld
marcgeld / homebridge
Created December 10, 2017 11:07 — forked from johannrichard/homebridge
Systemd Service for homebridge (http://github.com/nfarina/homebridge)
# Defaults / Configuration options for homebridge
# The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others)
HOMEBRIDGE_OPTS=-U /var/lib/homebridge
# If you uncomment the following line, homebridge will log more
# You can display this via systemd's journalctl: journalctl -f -u homebridge
# DEBUG=*
let healthStore = HKHealthStore()
@marcgeld
marcgeld / brew-sync.sh
Created September 30, 2015 21:08 — forked from jpawlowski/brew-sync.sh
Sync Homebrew installations between Macs via Dropbox
#!/bin/bash
# Sync Homebrew installations between Macs via Dropbox
#
BREW="/usr/local/bin/brew"
# first get local settings
echo "Reading local settings ..."
rm -f /tmp/brew-sync.*
@marcgeld
marcgeld / decrypt_dbvis.py
Last active September 11, 2015 11:49 — forked from gerry/decrypt_dbvis.py
A quick hack to extract and decrypt credentials from DbVisualizer config files.
#!/usr/bin/env python
# decrypt_dbvis.py ~ gerry@twitter.com
# DbVisualizer uses PBEWithMD5AndDES with a static key to store passwords.
# This is a quick hack to extract and decrypt credentials from DbVisualizer config files.
# Tested against DbVisualizer Free 9.0.9 and 9.2.10
"""
[2014-03-25 02:05:30][not-the-sea workspace]$ security/p/gerry/misc/decrypt_dbvis.py
[+] DbVisualizer Password Extractor and Decryptor (@gerryeisenhaur)
[+] Additional Usage Options:
[+] security/p/gerry/misc/decrypt_dbvis.py <config filename>