Skip to content

Instantly share code, notes, and snippets.

View hhallman's full-sized avatar

Hugo Hallman hhallman

  • Stockholm, Sweden
View GitHub Profile
@alvarow
alvarow / openssl-cheat.sh
Last active April 11, 2024 04:30
OpenSSL and Keytool cheat sheet
# Generate a new key
openssl genrsa -out server.key 2048
# Generate a new CSR
openssl req -sha256 -new -key server.key -out server.csr
# Check certificate against CA
openssl verify -verbose -CApath ./CA/ -CAfile ./CA/cacert.pem cert.pem
# Self Signed
@paceline
paceline / AirTunes on QNAP NAS How To.md
Last active December 21, 2015 00:09
Run Shairport AirTunes / AirPlay server emulator on a QNAP NAS.

Prerequisites

  • QNAP NAS
  • Supported USB sound card

"Solution"

  • First of all install Optware via the QPKG menu
  • Connect to your NAS (e.g. ssh admin@192.168.1.1)
  • Install various software packages with ipkg install xxx (mainly avahi, openssl, and various build tools - refer to my package list shown below)
@hhallman
hhallman / p.sh
Created November 28, 2012 10:13
bash project manager
#!/bin/bash
if [[ "$BASH_SOURCE" == "$0" ]]; then
ABSOLUTE_PATH=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)/`basename "${BASH_SOURCE[0]}"`;
echo "This ($ABSOLUTE_PATH) is a source script, and should not be run directliy. Rather source the script by running:
source $ABSOLUTE_PATH;
p;
"
fi
@windock
windock / about.md
Created August 9, 2011 16:52 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
@hhallman
hhallman / aliases.sh
Created March 29, 2011 00:33
Aliases, many for mac
#Rename the last screen dump on Mac
function sdname {
screen_dump_dir=$(defaults read com.apple.screencapture location);
filename="$( ls -rt $screen_dump_dir | tail -1 )";
echo renaming $screen_dump_dir/$filename;
title="$@";
while test -z "$title"; do echo "Give the dump a title (break to abort)"; read title; done;
mv "$screen_dump_dir/$filename" "$screen_dump_dir/$title-$filename";
}