Skip to content

Instantly share code, notes, and snippets.

Andrew Beresford beezly

Block or report user

Report or block beezly

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
beezly /
Created Sep 9, 2019
Use kpasswd to rotate through a number of passwords between your old and new passwords
#!/usr/bin/env bash
declare -a PASSWORDS
let last_cycle=CYCLE+1
for i in $(seq ${last_cycle}); do
echo $i
beezly /
Created Jan 13, 2019
ESP32 Hardware Interrupts in micropython
import machine
import sys
import utime
# Error buffer for inside ISRs
import micropython
class Run():
def __init__(self):
beezly /
Last active Jul 19, 2018
get a vault token using azure
#!/bin/bash -e
resource="https://<your resource URL>"
instance_data=$(curl -s -H 'Metadata: true' "${api_version}")
offer_data=$(curl -s -H 'Metadata: true' "${api_version}&resource=${resource}")
rg=$(jq -r .compute.resourceGroupName <<< $instance_data)
name=$(jq -er .compute.vmScaleSetName <<< $instance_data)
beezly / gist:52567aa8210fa16eae74a556ef14f0da
Created Apr 19, 2018
Delete One Password Items Duplicated by Title
View gist:52567aa8210fa16eae74a556ef14f0da
op list items | jq -r 'group_by(.overview.title) | .[] | select(length > 1) | min_by(.updatedAt) | .uuid' | xargs -n 1 op item delete

Keybase proof

I hereby claim:

  • I am beezly on github.
  • I am beezly ( on keybase.
  • I have a public key ASBqxtgg-zWLBnFoVdcBozWvYRuZfD40OmACI9-rUvPjZAo

To claim this, I am signing this object:

beezly / gist:3137c7db87c08931f04c58543dcca8c7
Last active Feb 15, 2017
Make jenkins use White on Black text in the console. Use with the Chrome Stylish extension to apply to your instance of Jenkins. --
View gist:3137c7db87c08931f04c58543dcca8c7
pre.console-output {
font: "Lucida Console", Monaco, monospace;
font-size: 11pt;
color: white;
background-color: black;
padding: 0.5em;
span.timestamp {
color: #888;
beezly / screenaver.pp
Created Jan 13, 2016
Puppet augeas to disable screensaver by default in RH6
View screenaver.pp
$enabled = false
lens => 'Xml.lns',
incl => '/etc/gconf/gconf.xml.defaults/%gconf-tree.xml',
context => '/files/etc/gconf/gconf.xml.defaults/%gconf-tree.xml/gconf/dir[#attribute[name="schemas"]]/dir[#attribute[name="apps"]]/dir[#attribute[name="gnome-screensaver"]]/dir[#attribute[name="lock_enabled"]]/local_schema/default',
changes => "set #attribute/value ${enabled}",
beezly / gist:84c6300982d9ec0cf53d
Last active Aug 29, 2015
Create Calendar Events when I get parking receipt messages. Depends on receiving an email in the right format from the parking payment provider.
View gist:84c6300982d9ec0cf53d
function processParkingMessages() {
// get all unread messages labelled as Parking
var parkingThreads = GmailApp.getUserLabelByName('Parking').getThreads();
var parkingThreadMessages = { return thread.getMessages(); });
var parkingMessages = [];
var parkingMessages = parkingMessages.concat.apply(parkingMessages, parkingThreadMessages);
var unreadParkingMessages = parkingMessages.filter(function(message) { return message.isUnread(); });
// Map through all the unread parking messages and search for a date/time in the appropriate format.
beezly / gist:9b2de3749d687fdbff3f
Last active Mar 14, 2019
Log Nest temperatures into a Google Spreadsheet. Update the username and password values and create a resource trigger to call "getData" at regular intervals.
View gist:9b2de3749d687fdbff3f
function performLogin(email, password) {
var payload = {
"username" : email,
"password" : password
var options = {
"method" : "post",
"payload" : payload
beezly / gist:267b80557900b865bc92
Last active Apr 2, 2019
Find the SSL/TLS version clients are negotiate with your SSL server. Adapt the "src port 443" part as per your requirements. Uses tshark from
View gist:267b80557900b865bc92
tshark -f 'src port 443 and ether[0x42]=0x16 and ether[0x47]=0x02' -T fields -e ip.dst_host -e ssl.handshake.version
You can’t perform that action at this time.