Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View rmrfslashbin's full-sized avatar

Robert Sigler rmrfslashbin

View GitHub Profile
@rmrfslashbin
rmrfslashbin / keybase.md
Last active September 20, 2018 18:25
My Keybase Proof

Keybase proof

I hereby claim:

  • I am rmrfslashbin on github.
  • I am rmrfslashbin (https://keybase.io/rmrfslashbin) on keybase.
  • I have a public key ASCcgFp0cp9qksvUqIs9i9iaiMscJkzD-mRGYbeLpCHGiQo

To claim this, I am signing this object:

@rmrfslashbin
rmrfslashbin / pipe-to-audio.md
Last active April 24, 2020 16:29
Howto: Pipe stuff to /dev/audio

Sometimes /dev/urandom sounds nice.

$ cat /dev/urandom | padsp tee /dev/audio > /dev/null

What about /boot?

$ sudo cat /dev/nvme0n1p2 | padsp tee /dev/audio > /dev/null
@rmrfslashbin
rmrfslashbin / easy-rsa+HAProxy.md
Last active January 6, 2024 11:21
Howto: Easy-rsa + HAProxy

These are some rough notes for deploying a test/dev local CA, a server key/cert, and a client key/cert. The intention is to provide a quick and dirty (don't use in production) local CA with one server and one client. HAProxy is used as an SSL terminator which forces SSL for all connections (via http redirect), then optionally accepts a client cert for authentication.

Easy-rsa

Follow the install guide for easy-rsa (https://github.com/OpenVPN/easy-rsa)

Init PKI

./easyrsa init-pki

Build CA

./easyrsa build-ca

@rmrfslashbin
rmrfslashbin / OpenSSL-CA.md
Last active November 21, 2022 16:19
Roll-your-own CA

Roll-your-own CA

So you want to learn how to make a CA...

Use-Case

  • This is a proof of concept. It should not be used as a production CA.
  • All tasks are presumed to be executed by the same user, on the same manhine.
  • A production CA would set up and leverage separation of duties.
  • A production CA would not generate CSRs, create the cert, and sign on the same machine.
  • As noted below, for user/client certs (ex: use a cert to provide authentication), vs service certs (https, smtps, etc) see the point related to -extensions usr_cert.
@rmrfslashbin
rmrfslashbin / RSA-Encryption-Notes.md
Last active September 20, 2018 17:28
Notes related to using public/private keys to encrypt data

RSA Encryption Notes

Notes related to using public/private keys to encrypt data.

Generate a private/public keypair

This section generates a new private key and extracts the public key.

Private & public parts

openssl genpkey -algorithm RSA -out private_key.pem -pkeyopt rsa_keygen_bits:4096

Extract public part

openssl rsa -pubout -in private_key.pem -out public_key.pem

@rmrfslashbin
rmrfslashbin / MediaWiki_on_Heroku.md
Last active August 16, 2022 06:26
Deploying and updating MediaWiki on Heroku.

Deploying and Updating MediaWiki on Heroku

This is a very rough guide to deploying and updating MediaWiki on Heroku. Lots of assumptions are made. Be sure to keep your MediaWiki deployment up-to-date!

Assumptions

  • A GitHub account.
  • A Heroku account.
  • A configured app on Heroku.
  • A MySQL (or compatible database. This guide assumes the use of Cleardb Heroku add-on).
  • Optional add-on: Hosted Graphite.
  • Optional add-on: Papertrail.
@rmrfslashbin
rmrfslashbin / FoxyProxy.md
Last active May 2, 2023 03:31
FoxyProxy: HOW-TO route all traffic through a proxy EXCEPT blacklisted domains.

FoxyProxy URL pattern filters.

This recipe sets up FoxyProxy to route all traffic through a proxy EXCEPT blacklisted domain (they will go out directly).

Assumptions

This receipe assumes a fresh FoxyProxy install, one proxy for everthing, excluding defined domains.

FoxyProxy Configuration

  • FoxyProxy should be set to Use proxies based on their pre-defined patterns and priorities.
  • Add a new proxy and configure the Proxy Details tab as needed.
@rmrfslashbin
rmrfslashbin / str2hex.py
Created October 3, 2019 01:04
Convert a string to hex
#!/usr/bin/env python
import binascii
def getHex(string):
x = binascii.hexlify(string.encode())
y = str(x,'ascii')
print("hex ", y)
@rmrfslashbin
rmrfslashbin / 00-README.md
Last active December 29, 2020 00:34
ESLint fix-on-save for VSCode

ESLint fix-on-save for VSCode

This brief guide will enable fix-on-save in VScode for js and vue files.

Install ESLint

ESLint needs to be installed twice: once inside your project and once globally.

# Install globally
$ npm install -g eslint

# Install in project
#!/usr/bin/env python3
##
# This script walks block storage devices and locates
# EC2 instance stores. It then lables the disks as
# LMV2 physical volumes (PV), creates an LVM2 volume
# group (VG), then an LVM2 logical volume (LV) and
# finally formats the new LV as XFS.
##