Skip to content

Instantly share code, notes, and snippets.

View sames's full-sized avatar

Stefan Ames sames

  • Leopoldshöhe, Germany
View GitHub Profile
@sames
sames / certhelper.sh
Last active February 28, 2025 14:17
Helper Script to create a new Certificate Authority and Certificates for your local lan.
#!/bin/bash
# Certhelper - A tool for creating certificates with OpenSSL
#
# Usage:
# certhelper.sh -h | --help - Display this help
# certhelper.sh -ca [name] - Create a new Certificate Authority (default: rootca)
# certhelper.sh -cert <domain> [ca] - Create a new certificate for <domain> using specified CA
# certhelper.sh -i <ca-name|domain> - Install a certificate on the system (Linux only)
# certhelper.sh -list - List all existing CAs
#!/bin/bash
#
# Enable TRIM support for 3rd Party SSDs. Works for Mountain Lion, should work on earlier OSes too.
# Tested on 10.8.2, checked for proper operation on 10.8.0, but never booted with the modified kext.
#
# Original source: http://digitaldj.net/2011/07/21/trim-enabler-for-lion/
set -e
set -x
@sames
sames / glacier.py
Created August 23, 2012 10:29
Amazon Glacier from Python. Based on Boto, will contribute to Boto when it's a little more finished if it's any good at that point :)
# Thomas Parslow http://almostobsolete.net
# Just a work in progress and adapted to what I need right now.
# It does uploads (via a file-like object that you write to) and
# I've started on downloads. Needs the development version of Boto from Github.
#
# Example:
#
# glacierconn = GlacierConnection(AWS_ACCESS_KEY, AWS_SECRET_ACCESS_KEY)
# writer = GlacierWriter(glacierconn, GLACIER_VAULT)
# writer.write(somedata)