This generates a public/private keypair.
$ gpg --gen-key
$ gpg --list-secret-keys
# 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 |
# running this will consume 10GB of data in the target path | |
# use SIGINT to stop (Ctrl + C) | |
function Run { | |
Param( | |
[ValidateNotNullOrEmpty()] | |
[string]$Target | |
) |
#!/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 |
package main | |
import ( | |
"fmt" | |
"net/url" | |
"github.com/pkg/errors" | |
) | |
func main() { |
{ | |
"$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" |
Golang doesn't have try/catch blocks, so you can't simply "throw" an error and hope something will catch it and give you a stack-trace showing you where it came from. Instead we return errors and check them ... but it's important to introduce context before returning ... here's why
Here a simple go program I wrote which doesn't appear to work 🤔
$ go run main.go
access denied
... it attempts to "process" and "save", but since the "process" function adds no context to the error (it just bubbles it up), the final error is very confusing!
SHELL := node | |
.SHELLFLAGS = -e | |
.ONESHELL: example | |
.SILENT: example | |
example: | |
const foo = "bar" | |
console.log( "success", { foo } ) |
#!/usr/bin/env python3 | |
import boto3 | |
# constants | |
role_name = 'OrganizationAccountAccessRole' | |
regions_in_scope = [ | |
'us-east-2', | |
'us-east-1', | |
'us-west-1', | |
'us-west-2', |