Skip to content

Instantly share code, notes, and snippets.

View whenceforth's full-sized avatar

Art Peel whenceforth

  • San Francisco, CA
View GitHub Profile
@whenceforth
whenceforth / jasypt.py
Created September 6, 2019 22:57 — forked from bertramn/jasypt.py
Jasypt/Bouncycastle PBEWITHSHA256AND256BITAES-CBC-BC en/decryption in Python
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
from abc import ABCMeta
from array import array
from base64 import b64encode, b64decode
from Crypto import Random
from Crypto.Cipher import AES
from Crypto.Hash import SHA256
@whenceforth
whenceforth / fancy.plantuml
Created February 12, 2019 02:00 — forked from anoff/fancy.plantuml
plantUML stylesheet
@startuml fancy
skinparam sequence {
LifeLineBorderColor Green
ArrowColor black
ParticipantBorderColor black
ParticipantBackgroundColor GreenYellow
ParticipantFontColor black
}
skinparam actor {
backgroundColor white
@whenceforth
whenceforth / prometheus-kubernetes-workshop.md
Created January 31, 2018 18:03 — forked from fstab/prometheus-kubernetes-workshop.md
Prometheus/Kubernetes Workshop Notes

These are notes for my Kubernetes/Prometheus workshop. The notes for the Prometheus introduction workshop can be found here.

The first part of this workshop is taken from episode 001 of the excellent TGI Kubernetes series by Heptio.

The demo runs on AWS.

Preparation (before the workshop)

Before the demo, do the following:

@whenceforth
whenceforth / prometheus-workshop.md
Created January 31, 2018 18:02 — forked from fstab/prometheus-workshop.md
Prometheus Workshop Notes

These are notes for my Prometheus workshop. The follow-up workshop on Prometheus/Kubernetes can be found here.

Overview

  • Technology: Time Series Database
  • Approach: Black Box vs White Box
  • Scope: Time Series (Prometheus) vs. Logfiles (ELK), vs. Tracing (Zipkin)

node_exporter

@whenceforth
whenceforth / blockchain.md
Created January 9, 2018 20:14 — forked from joepie91/blockchain.md
Is my blockchain a blockchain?

Your blockchain must have all of the following properties:

  • It's a merkle tree, or a construct with equivalent properties.
  • There is no single point of trust or authority; nodes are operated by different parties.
  • Multiple 'forks' of the blockchain may exist - that is, nodes may disagree on what the full sequence of blocks looks like.
  • In the case of such a fork, there must exist a deterministic consensus algorithm of some sort to decide what the "real" blockchain looks like (ie. which fork is "correct").
  • The consensus algorithm must be executable with only the information contained in the blockchain (or its forks), and no external input (eg. no decisionmaking from a centralized 'trust node').

If your blockchain is missing any of the above properties, it is not a blockchain, it is just a ledger.

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@whenceforth
whenceforth / README.md
Created November 1, 2017 14:55 — forked from magnetikonline/README.md
Bash if expressions cheatsheet.
@whenceforth
whenceforth / osx_yosemite_disable_features.sh
Created July 12, 2016 15:09 — forked from guycalledseven/osx_yosemite_disable_features.sh
Disabling OSX Yosemite annoyances / features I have no use of
# Tested on OSX Yosemite 10.10.4
# there is also an updated version (work in progress) for El Capitan here https://gist.github.com/guycalledseven/31ffe35eca056838b06b
# XXX TODO
# should I disable com.google.Keystone.Agent ??
# http://applehelpwriter.com/2014/07/13/how-to-remove-googles-secret-update-software-from-your-mac/
# Stop DS_Store file creation on network connections
# restart Finder afterwards
public class SSLProtocolTests {
public static void main(String[] args) throws Exception {
SSLContext context = SSLContext.getDefault();
SSLSocketFactory factory = (SSLSocketFactory)context.getSocketFactory();
SSLSocket socket = (SSLSocket)factory.createSocket();
String[] protocols = socket.getSupportedProtocols();
System.out.println("Supported Protocols: " + protocols.length);
for(int i = 0; i < protocols.length; i++)
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'