Skip to content

Instantly share code, notes, and snippets.

@soarez
soarez / ca.md
Last active April 15, 2024 12:20
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@natelandau
natelandau / .bash_profile
Last active March 20, 2024 22:19
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@thde
thde / whois.conf
Last active September 1, 2023 07:29
/etc/whois.conf WHOIS records for nTLDs.
##
# WHOIS servers for new TLDs (http://www.iana.org/domains/root/db)
# Current as of 2017-12-10 UTC
##
\.aarp$ whois.nic.aarp
\.abarth$ whois.afilias-srs.net
\.abbott$ whois.afilias-srs.net
\.abbvie$ whois.afilias-srs.net
\.abc$ whois.nic.abc
@justmoon
justmoon / custom-error.js
Last active April 14, 2024 14:27 — forked from subfuzion/error.md
Creating custom Error classes in Node.js
'use strict';
module.exports = function CustomError(message, extra) {
Error.captureStackTrace(this, this.constructor);
this.name = this.constructor.name;
this.message = message;
this.extra = extra;
};
require('util').inherits(module.exports, Error);
@JasonGhent
JasonGhent / pi_qemu.sh
Last active March 24, 2024 14:36
OSX raspberry pi emulation via QEMU. v2 attempt @ https://gist.github.com/JasonGhent/922f38f57c8cb77b10f3
# pulled from http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/
# expanded via http://superuser.com/questions/690060/how-to-enable-network-with-a-raspberry-pi-emulated-on-qemu
# tested with 2015-02-16-raspbian-wheezy.zip on OSX Mavericks
# OSX terminal
brew install qemu
# kernel-qemu is a linux kernel compiled with ARM1176 support.
# learn more here: http://xecdesign.com/compiling-a-kernel/
curl -OL http://xecdesign.com/downloads/linux-qemu/kernel-qemu
curl -o raspbian_latest.zip -L http://downloads.raspberrypi.org/raspbian_latest
@bmhatfield
bmhatfield / .profile
Last active March 18, 2024 07:43
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@danieleggert
danieleggert / GPG and git on macOS.md
Last active April 10, 2024 22:15
How to set up git to use the GPG Suite

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys