Skip to content

Instantly share code, notes, and snippets.

View scottwallacesh's full-sized avatar

Scott Wallace scottwallacesh

View GitHub Profile
@scottwallacesh
scottwallacesh / build-mono.sh
Created October 5, 2016 14:49
Steps for building Mono v3.10 on an old Netgear ReadyNAS Ultra 4
# Compiling Mono for the ReadyNAS Ultra-4 running Debian 4.0 (etch)
## Requires modern version of GCC and binutils
# Somewhere to build
mkdir -p /c/src
# Fetch and build GCC & deps
cd /c/src
curl -O ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.9.4/gcc-4.9.4.tar.bz2
tar xvfh gcc-4.9.4.tar.bz2
@scottwallacesh
scottwallacesh / RSA_encrypt_decrypt_strings_files_using_OpenSSL_and_RSA_SSH_keys
Created February 18, 2016 08:58
Encrypt and/or decrypt strings or files using OpenSSL and SSH RSA keys
# encrypt stdin
echo "secret" | openssl rsautl -encrypt -inkey ~/.ssh/id_rsa -out secret.enc
# encrypt file
openssl rsautl -encrypt -inkey ~/.ssh/id_rsa -in secret.txt -out secret.enc
# decrypt to stdout
openssl rsautl -decrypt -inkey ~/.ssh/id_rsa -in secret.enc
@scottwallacesh
scottwallacesh / RSA_pubkey_to_PEM
Last active February 16, 2016 21:01
Create SSH public key in PEM format for OpenSSL encryption/decryption
openssl rsa -in ~/.ssh/id_rsa -pubout -out ~/.ssh/id_rsa.pub.pem