Skip to content

Instantly share code, notes, and snippets.

View tonyyates's full-sized avatar

Tony Yates tonyyates

  • UK
View GitHub Profile
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: kubernetes-dashboard
labels:
k8s-app: kubernetes-dashboard
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
@tonyyates
tonyyates / extract-123-reg-zonefile.js
Created May 23, 2017 18:25 — forked from biinari/extract-123-reg-zonefile.js
Script to extract the DNS entries from 123-reg advanced dns page
var table = document.getElementsByClassName('advanced_dns')[0];
var rows = table.getElementsByTagName('tr');
var i, len, row;
var hostname, type, priority, ttl, destination;
var output = '';
output += '$TTL 600\n'; // start with default TTL
// skip header and last two rows (add new entry, delete all entries)
for (i = 1, len = rows.length - 2; i < len; i++) {
@tonyyates
tonyyates / gist:b1c4184217ae435b2dd52b559f99b0f3
Created March 15, 2017 18:58
See what you have been working on today
See what you’ve been working on today:
$ git log --since="00:00:00" --no-merges --oneline --author=<[email protected]> https://t.co/CMcVb2EMyo
@tonyyates
tonyyates / Clone all Repos
Last active March 15, 2017 10:57
Clone all Repos from an ORG
Needs Ruby 1.9 as a minimum
curl -s https://api.github.com/orgs/<insert org>/repos | ruby -rjson -e 'JSON.load(STDIN.read).each {|repo| %x[git clone #{repo["ssh_url"]} ]}'
@tonyyates
tonyyates / arduino matrix led
Last active September 10, 2019 12:04
Arduino Matrix LED
unsigned char i;
unsigned char j;
/*Port Definitions*/
int Max7219_pinCLK = 10;
int Max7219_pinCS = 9;
int Max7219_pinDIN = 8;
unsigned char disp1[38][8]={
{0x8,0x14,0x22,0x3E,0x22,0x22,0x22,0x22},//A
{0x3C,0x22,0x22,0x3E,0x22,0x22,0x3C,0x0},//B
@tonyyates
tonyyates / gist:fbe374e90510c8444c83
Created May 4, 2014 07:30
Iterate through a html table with jQuery
$('#tbl tr').each(function ()
{
var $row = $(this);
$row.children().each(function ()
{
var $cell = $(this);
// do something with the current <tr> and <td>
});
});