Skip to content

Instantly share code, notes, and snippets.

View jamesinc's full-sized avatar

James Ducker jamesinc

View GitHub Profile
@jamesinc
jamesinc / current-au-nsw-time.js
Created July 14, 2015 00:27
Calculate correct current AEST/ADST time
var getCurrentAestDate = function ( ) {
var d = new Date(),
timezone = 10,
utc = d.getTime() - ( d.getTimezoneOffset() * 60000 ),
// Current +10 (AEST) time
aest = new Date( utc + (3600000 * -timezone) ),
// Current +11 (ADST) time
adst = new Date( utc + (3600000 * -(timezone+1)) ),
// Set to start of the month DST starts (October)
// and time of rollover (0200)
@jamesinc
jamesinc / wartodeb.sh
Last active March 2, 2021 01:27
Turns a WAR file into a DEB file for Tomcat use
#!/bin/bash
#
# WAR to DEB
# This script takes a WAR file, and packages it into a DEB file targetting tomcat's default webapps directory,
# /var/lib/tomcatX/webapps
# Arguments:
# -h Help text
# -s Tomcat version (default: 7)
# -p Custom output path
# -f Input WAR file
@jamesinc
jamesinc / aws-ui-shorter-shortcuts.user.js
Last active June 5, 2022 22:36
A Tampermonkey script to replace various AWS console service names with acronyms, so they take up less space in the shortcuts bar.
// ==UserScript==
// @name AWS UI scrubber
// @namespace https://github.com/jamesinc
// @version 1.5
// @description Make AWS Console shortcuts take up less space
// @author James Ducker
// @match https://*.console.aws.amazon.com/*
// @match https://phd.aws.amazon.com/*
// @grant none
// @run-at document-end
@jamesinc
jamesinc / aws-notification-timer.user.js
Last active February 7, 2024 22:20
AWS console notification dismisserator 9000 - dismiss AWS flash notifications after (about) 5 seconds
// ==UserScript==
// @name AWS console notification dismisserator 9000
// @namespace https://github.com/jamesinc
// @version 1.1
// @description Dismiss AWS flash notifications after about 5 seconds
// @author James Ducker
// @match https://*.console.aws.amazon.com/*
// @grant none
// @run-at document-end
// ==/UserScript==