Skip to content

Instantly share code, notes, and snippets.

View baldwicc's full-sized avatar

Chris Baldwin baldwicc

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Test for QUT Media Warehouse playback" />
<title>QMW HTML5 Video Test</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
<link href="https://mediawarehouse.qut.edu.au/QMW/css/vendor/bootstrap.css" rel="stylesheet">
@baldwicc
baldwicc / xss-test.js
Created June 12, 2014 06:01
XSS Test
alert('script loaded');
@baldwicc
baldwicc / gist:f9c28f366d8c8d0eb80e
Last active August 29, 2015 14:02 — forked from remy/gist:350433
sessionStorage and localStorage Polyfill
if (typeof window.localStorage == 'undefined' || typeof window.sessionStorage == 'undefined') (function () {
var Storage = function (type) {
function createCookie(name, value, days) {
var date, expires;
if (days) {
date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
expires = "; expires="+date.toGMTString();
# Short of learning how to actually configure OSX, here's a hacky way to use
# GNU manpages for programs that are GNU ones, and fallback to OSX manpages otherwise
# Borrowed from https://gist.github.com/quickshiftin/9130153
if which brew &> /dev/null; then
if brew list | grep coreutils &> /dev/null; then
alias man='_() { echo $1; man -M $(brew --prefix)/opt/coreutils/libexec/gnuman $1 1>/dev/null 2>&1; if [ "$?" -eq 0 ]; then man -M $(brew --prefix)/opt/coreutils/libexec/gnuman $1; else man $1; fi }; _'
fi
fi
#!/bin/bash
# This script is edited by Brice Dutheil
# See there in french http://blog.arkey.fr/2012/07/30/script-pour-installer-le-jdk-5-sur-macosx-lion/
# Translate button is broken for now, please use Google to translate this website.
#
# 2014/02/10 Updated the script to run on OSX 10.9 Maverick
#
# 2013/05/11 Added a few more guidance when Java Preferences is not available anymore
# Added a simple example of a JDK switch function.
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define(function () {
return (root.returnExportsGlobal = factory());
});
}
else if (typeof exports === 'object') {
module.exports = factory();
}
else {
@baldwicc
baldwicc / jquery.galleriffic.js
Last active August 29, 2015 14:26
Galleriffic is a jQuery photo gallery optimized to handle high volumes of photos while conserving bandwidth (http://www.twospy.com/galleriffic/index.html)
/**
* jQuery Galleriffic plugin
*
* Copyright (c) 2008 Trent Foley (http://trentacular.com)
* Licensed under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*
* Much thanks to primary contributer Ponticlaro (http://www.ponticlaro.com)
*/
@baldwicc
baldwicc / jquery.debounce.js
Last active October 2, 2015 01:24
Verbatim copy of underscore.js' debounce function, as a jquery plugin (amd friendly)
;(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else {
factory(jQuery);
}
}(function ($) {
// Thefted from Underscore.js 1.8.3
// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
@baldwicc
baldwicc / brew-update-notifier.sh
Created September 13, 2016 01:29 — forked from SimonSimCity/brew-update-notifier.sh
Extended the script, written by @streeter to exclude the pinned formulae in the list of formulas to update.
#!/bin/bash
#
# Notify of Homebrew updates via Notification Center on Mac OS X
#
# Author: Chris Streeter http://www.chrisstreeter.com
# Requires: terminal-notifier. Install with:
# brew install terminal-notifier
TERM_APP='/Applications/Terminal.app'
BREW_EXEC='/usr/local/bin/brew'
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"rel="stylesheet">
<script src="https://code.jquery.com/jquery-3.1.0.js"></script>