Skip to content

Instantly share code, notes, and snippets.

@petehamilton
petehamilton / README.md
Last active March 31, 2020 18:18
Circle CI Build Status widget for Dashing (Multiple Builds)

Description

Dashing widget to show the status of builds from CircleCI. Also shows the avatar of the person who is running/breaking/passing the current build.

Usage

  • Get a Circle API Token from your Account Dashboard and set it in your environment as CIRCLE_CI_AUTH_TOKEN
  • Add the httparty to your Gemfile and run bundle install

Then:

@petehamilton
petehamilton / README.md
Last active July 8, 2021 09:50
Circle CI Build Status widget for Dashing (Single Builds)

Description

Dashing widget to show the build status of a CircleCI project.

Usage

  • Get a Circle API Token from your Account Dashboard and set it in your environment as CIRCLE_CI_AUTH_TOKEN
  • Add the httparty to your Gemfile and run bundle install

Then:

find . -name '*.git' -execdir sh -c 'cd {} && git gc' \; # Compress all git repos under current directory
@petehamilton
petehamilton / README.md
Last active December 16, 2015 22:19
Matrix Multiply Feedback

Matrix Multiply Aggregated Feedback

Indentation

Many of you (understandably) applied a sort of nesting indentation to your assembly code something like this:

for_row: mov r9, 0
next_row:
 COMPARISON
@petehamilton
petehamilton / are_exam_results_up_yet.sh
Last active December 19, 2015 07:09
Are exams results online yet?
#!/bin/bash
EXAMS_URL="https://exams.doc.ic.ac.uk/"
echo "##############################################"
echo "# Exam Results Checker"
echo "##############################################"
echo -ne "Username: "
read username
stty -echo
@petehamilton
petehamilton / README.md
Last active December 19, 2015 17:39
FlatUI Radio Button Directive for AngularJS

FlatUI RadioButton AngularJS Directive

This means you can ignore the "flatui-radio.js" file and just use plain angular. Not had any problems so far.

screen shot 2013-07-14 at 07 07 19

var app = angular.module('testapp', ['ngRoute']);
app.config(function ($locationProvider) {
// $locationProvider.html5Mode(true);
})
app.controller('MainCtrl', function ($scope, $location, $route) {
// Example URLs which should work on refresh
//

Keybase proof

I hereby claim:

  • I am petehamilton on github.
  • I am petehamilton (https://keybase.io/petehamilton) on keybase.
  • I have a public key whose fingerprint is 7809 8DC6 825F 4184 8139 C43B 0621 AE2E 2952 C17E

To claim this, I am signing this object:

@petehamilton
petehamilton / openssl-encrypt.sh
Last active March 5, 2016 09:26
Example of Encrypting File with OPENSSL. Based on http://www.czeskis.com/random/openssl-encrypt-file.html
#! /usr/bin/env bash
set -e
set -u
PRIVATE_KEY='private-key.pem'
PUBLIC_KEY='public-key.pem'
KEY_FILE="key.bin"
KEY_FILE_ENCRYPTED="key.bin.enc"
CSV_FILE='fixture-secret.txt'