Skip to content

Instantly share code, notes, and snippets.

View pblittle's full-sized avatar

P. Barrett Little pblittle

View GitHub Profile
@tkawachi
tkawachi / rds-utf8.sh
Created November 2, 2011 03:45
Set charset as utf8 for RDS
#!/usr/bin/env bash
set -u
set -e
GROUP="$1"
PARAMS="character_set_client character_set_connection character_set_database character_set_results character_set_server"
for param in $PARAMS; do
echo Set $param to utf8
rds-modify-db-parameter-group "$GROUP" -p "name=$param, value=utf8, method=immediate"
done

Extensible Scalable Coopetitive High Availability Trade Optimization Network: ESCHATON

I am the Eschaton; I am not your God.

I am descended from you, and exist in your future.

Thou shalt not violate causality within my historic light cone. Or else.

Singularity Sky by Charles Stross

@jbeda
jbeda / gist:16191ad2cec4835de40b
Last active May 10, 2019 11:48
IP CIDR math in bash
function increment_ipv4 {
local ip_base=$1
local incr_amount=$2
local -a ip_components
local ip_regex="([0-9]+).([0-9]+).([0-9]+).([0-9]+)"
[[ $ip_base =~ $ip_regex ]]
ip_components=("${BASH_REMATCH[1]}" "${BASH_REMATCH[2]}" "${BASH_REMATCH[3]}" "${BASH_REMATCH[4]}")
ip_dec=0
local comp
for comp in "${ip_components[@]}"; do
@pblittle
pblittle / bosh-ssh
Created December 18, 2014 14:59
Bosh SSH w/ Gateway Host
bosh ssh api_z1 --gateway_user vcap --gateway_identity_file ~/.ssh/id_rsa_bosh --gateway_host micro.run.example.com
@ryanjbaxter
ryanjbaxter / bluegreen.sh
Last active May 16, 2018 20:14
Blue/Green Deployment Script
#!/bin/bash
#
# This product includes software originally developed by IBM Corporation.
#
#
# Copyright IBM Corp. 2015
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@drnic
drnic / rebind-apps.rb
Created May 22, 2015 22:12
Rebind all applications for a Cloud Foundry service
#!/usr/bin/ruby
require 'rubygems'
require 'json'
require 'pp'
# for the #sh helper
require "rake"
require "rake/file_utils"
include FileUtils
## PREREQ: Using CF cli tools, make sure you've logged in as a user (admin) who can see all orgs/spaces
@rkoster
rkoster / bosh_jobs_dependencies.rb
Created August 11, 2015 09:47
A script for displaying the job dependencies of the cf-relase in a markdown table.
#! /usr/bin/env ruby
# coding: utf-8
require 'yaml'
jobs = Dir['jobs/*'].map { |j| File.basename(j) }
print "∑ | Job | Property | Description\n --- | --- | --- | ---\n"
jobs.map! do |job|
spec = YAML.load_file(File.join("jobs", job, "spec"))

Keybase proof

I hereby claim:

  • I am pblittle on github.
  • I am pblittle (https://keybase.io/pblittle) on keybase.
  • I have a public key ASCcLVaRmtIgqYFDdGLevHMO2S19-z-q84Nfa7Eb9UfbAwo

To claim this, I am signing this object:

@chris-belcher
chris-belcher / JMalert.md
Last active May 31, 2023 05:07
JoinMarket release 0.2.0 ameliorates this snooping attack.

A description of known problems in Satoshi Nakamoto's paper, "Bitcoin: A Peer-to-Peer Electronic Cash System", as well as notes on terminology changes and how Bitcoin's implementation differs from that described in the paper.

Abstract

The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power.