Skip to content

Instantly share code, notes, and snippets.

View pwmcintyre's full-sized avatar
🥑
golang fever

Peter McIntyre pwmcintyre

🥑
golang fever
View GitHub Profile
{
"$id": "https://example.com/arrays.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "A representation of a person, company, organization, or place",
"type": "object",
"properties": {
"fruits": {
"type": "array",
"items": {
"type": "string"
package main
import (
"fmt"
"net/url"
"github.com/pkg/errors"
)
func main() {
#!/usr/bin/env bash
# message to en/decrypt
ORIGINAL_DATA="hello-world"
KEY_ALIAS="alias/example"
# AWS CLI bits
PROFILE_ENCRYPT=saml
PROFILE_DECRYPT=ASIAZF3IWVKQWIYJWJW7
REGION=us-east-1
@pwmcintyre
pwmcintyre / benchmark-disk.ps1
Last active March 20, 2018 02:51
PowerShell - Continuously write random data to a disk
# running this will consume 10GB of data in the target path
# use SIGINT to stop (Ctrl + C)
function Run {
Param(
[ValidateNotNullOrEmpty()]
[string]$Target
)
@pwmcintyre
pwmcintyre / GNUPG Cheatsheet.md
Created February 28, 2017 23:36 — forked from turingbirds/GNUPG Cheatsheet.md
GPG (GNUPG) Cheatsheet

GNUPG CHEATSHEET

Setting up: key generation

This generates a public/private keypair.

$ gpg --gen-key

$ gpg --list-secret-keys

@pwmcintyre
pwmcintyre / tmux.conf
Created February 28, 2017 22:14 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000