Skip to content

Instantly share code, notes, and snippets.

@briansmith
briansmith / how-to-generate-and-use-private-keys-with-openssl-tool.md
Last active April 11, 2024 17:02
How to generate & use private keys using the OpenSSL command line tool

How to Generate & Use Private Keys using OpenSSL's Command Line Tool

These commands generate and use private keys in unencrypted binary (not Base64 “PEM”) PKCS#8 format. The PKCS#8 format is used here because it is the most interoperable format when dealing with software that isn't based on OpenSSL.

OpenSSL has a variety of commands that can be used to operate on private key files, some of which are specific to RSA (e.g. openssl rsa and openssl genrsa) or which have other limitations. Here we always use

@ertseyhan
ertseyhan / temp.sh
Last active November 7, 2017 07:42
Display the ARM CPU and GPU temperature of Raspberry Pi 2/3
#!/bin/bash
# Script: temp.sh
# Purpose: Display the ARM CPU and GPU temperature of Raspberry Pi 2/3
# -------------------------------------------------------
cpu=$(</sys/class/thermal/thermal_zone0/temp)
echo "CPU >> $((cpu/1000))'C"
echo "GPU >> $(/opt/vc/bin/vcgencmd measure_temp | cut -d = -f2)"
@ertseyhan
ertseyhan / remount.sh
Created February 2, 2016 20:51
Temporarily increase size of tmp folder on Arch linux
#!/bin/bash
sudo mount -o remount,size=10G,noatime /tmp
echo "Done. Please use 'df -h' to make sure folder size is increased."