Skip to content

Instantly share code, notes, and snippets.


Donal donalod

View GitHub Profile
donalod /
Created May 25, 2020
Squash Current Git Commits
#!/usr/bin/env bash
echo -e "Squashing last commits since push...\n"
git reset --soft HEAD~$(git log @{u}.. | grep -i commit | wc -l | tr -d ' ') && git commit -am "$1"
#!/usr/bin/env bash
if [[ ${#1} = 0 ]]; then
echo "Note: First edit the script to update the JSON key and value to change."
echo "Usage: ./ <file_glob_pattern>"
exit 0;
View covid_19_ie_stats
# Taken from
curl -s -G -d "f=json" -d "where=1=1" -d "returnGeometry=false" -d "spatialRel=esriSpatialRelIntersects" -d "outFields=*&groupByFieldsForStatistics=CountyName" -d "outStatistics=[{\"statisticType\":\"sum\",\"onStatisticField\":\"ConfirmedCovidCases\",\"outStatisticFieldName\":\"value\"}]" -d "cacheHint=true" | jq '.features[].attributes | "\(.CountyName),\(.value)"' | sort -nr -k2 -t","
donalod / covid_improved.rb
Last active Mar 17, 2020
View covid_improved.rb
#!/usr/bin/env ruby
# Requires you to install "spark" with ports or homebrew + the below gems.
require "csv"
require 'time'
require 'httparty'
require 'colorize'
require 'tty-progressbar'
View aib2xero.rb
#!/usr/bin/env ruby
# Turns an AIB CSV export in to a Xero friendly import.
# This script is quick and dirty, feel free to DRY it up and improve....
# Xero likes:
# Date, Amount (-/+ prefix), Payee, Description, Reference, Cheque Number, Analysis Code, Transaction Type
# AIB : IB(Internet Banking) : Historical
# Posted Account, Posted Transactions Date, Description1, Description2, Description3, Debit Amount, Credit Amount,Balance,Posted Currency,Transaction Type,Local Currency Amount,Local Currency
donalod / submit_to_rekognition.rb
Created Jun 12, 2019
View submit_to_rekognition.rb
#!/usr/bin/env ruby
require "aws-sdk-rekognition"
require "catpix"
# Images from and
p "Running face rekog script at #{}"
image_ids = { rand(1...482) }
donalod / tito_to_slack_ticket_counts.rb
Last active May 12, 2019
View tito_to_slack_ticket_counts.rb
#!/usr/bin/env ruby
require "httparty"
p "Running iNOG Tito ticket script at #{}"
# Replace <replace_with_yours> with your specific tokens, data, or urls
slack_webhook_url = "<replace_with_yours>"
tito_token = "<replace_with_yours>"
donalod / yamlfornetworkengineers_index.html
Last active Jan 14, 2019
View yamlfornetworkengineers_index.html
<!DOCTYPE html>
<html class="no-js" lang="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>YAML for Network and Cloud Engineers</title>
<meta name="author" content="irldexter">
<link rel="canonical" href="">
<meta name="keywords" content="nre, sre, network reliability engineering, netdevops, technical recruitment, YAML, Yet Another Markup Language, yamllint, code, network automation, sdn, software defined networking, network function virtualization">
donalod /
Last active Dec 13, 2018
#!/usr/bin/env python
## 'pycodestyle' and 'autopep8 --in-place'
# Labs from
# All slides from all sessions
# AWS Builders Day 2018 in Dublin at the Aviva Stadium
# wget
# wget -O Inception-BN-0000.params
# wget
#!/usr/bin/env python
# 'pycodestyle' and 'autopep8 --in-place'
# Imports
import ipaddress
import subprocess
from random import randint
from time import sleep
You can’t perform that action at this time.