Skip to content

Instantly share code, notes, and snippets.

View neuhaus's full-sized avatar
💭
looking for contributors to sovereign!

S. Neuhaus neuhaus

💭
looking for contributors to sovereign!
View GitHub Profile
@aksh1618
aksh1618 / flac2mp3.sh
Created October 19, 2020 05:21
Script to use ffmpeg with libmp3lame for VBR encoding of tree of FLACs to tree of mp3s
#!/bin/sh
# Based on https://github.com/patrodyne/patrodyne-scripts/tree/master/flac2mp3
# Modified by aksh1618
# PatroDyne: Patron Supported Dynamic Executables, http://patrodyne.org
# MIT license: https://raw.githubusercontent.com/patrodyne/patrodyne-scripts/master/LICENSE
#
# flac2mp3.sh - Linux script to convert FLAC audio files to MP3 files.
#
# Usage:
#
# @OneLogicalMyth
function New-cPassword($unencryptedString) {
# encrypt string to known AES key used by cPassword
$AesObject = New-Object System.Security.Cryptography.AesCryptoServiceProvider
$AesObject.Mode = [System.Security.Cryptography.CipherMode]::CBC
$AesObject.IV = New-Object Byte[]($AesObject.IV.Length)
$AesObject.KeySize = 256
$AesObject.Key = @(0x4e,0x99,0x06,0xe8,0xfc,0xb6,0x6c,0xc9,0xfa,0xf4,0x93,0x10,0x62,0x0f,0xfe,0xe8,
0xf4,0x96,0xe8,0x06,0xcc,0x05,0x79,0x90,0x20,0x9b,0x09,0xa4,0x33,0xb6,0x6c,0x1b)
$encryptor = $AesObject.CreateEncryptor()
@igrr
igrr / ESP8266httpsUpdate.ino
Last active October 30, 2022 14:18
ESP8266 ota over HTTPS
/*
OTA update over HTTPS
As an example, we download and install ESP8266Basic firmware from github.
Requires latest git version of the core (November 17, 2015)
Created by Ivan Grokhotkov, 2015.
This example is in public domain.
*/
@richieforeman
richieforeman / makeauthority.sh
Created July 23, 2012 21:38
Issue Your Own Self-Signed S/MIME Certs with OpenSSL
# Run this once
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@tuansoibk
tuansoibk / cryptography-file-formats.md
Last active April 15, 2024 17:07
Cryptography material conversion and verification commands
  1. Introduction
  2. Standards
  3. Common combinations
  4. Conversion
  5. Verification/Inspection
  6. Tips for recognising

Introduction

It happens that there are many standards for storing cryptography materials (key, certificate, ...) and it isn't always obvious to know which standard is used by just looking at file name extension or file content. There are bunch of questions on stackoverflow asking about how to convert from PEM to PKCS#8 or PKCS#12, while many tried to answer the questions, those answers may not help because the correct answer depends on the content inside the PEM file. That is, a PEM file can contain many different things, such as an X509 certificate, a PKCS#1 or PKCS#8 private key. The worst-case scenario is that someone just store a non-PEM content in "something.pem" file.

@sscotth
sscotth / keystroke the clipboard extended.workflow
Last active April 17, 2024 12:21
Paste as keystrokes (macOS)
# Why?
# To paste text into windows that normally don't allow it or have access to the clipboard.
# Examples: Virtual machines that do not yet have tools installed, websites that hijack paste
#
# Extended vs Simple?
# * Includes an initial delay to allow you to change active windows
# * Adds small delay between keypresses for slower responding windows like SSH sessions
# * Better handling of numbers
# * VMWare bug fix
#