Skip to content

Instantly share code, notes, and snippets.

View marklawlor's full-sized avatar
💯

Mark Lawlor marklawlor

💯
View GitHub Profile
@marklawlor
marklawlor / setup.sh
Last active September 21, 2016 14:39
WIP Helper script to setup Mac OSX from a clean install
#!/bin/bash
#
# Helper functions
#
function pause(){
read -p "$*"
}
@marklawlor
marklawlor / gist:01fed96ba9801bc3159a
Created October 7, 2014 23:31
iOS webkit overflow scrolling issue
/*
Source:http://stackoverflow.com/questions/18736297/webkit-overflow-scrolling-touch-broken-for-initially-offscreen-elements-in-i
*/
document.getElementById("scrollbox").addEventListener('touchstart', function(event){});
@marklawlor
marklawlor / afterorientationchange
Created October 2, 2014 01:31
orientationchange fires before the window resize event, which is not ideal when you need to resize content for the new viewport dimensions. This fix will allow you to handle orientation changes after the page has resized
window.addEventListener("orientationchange", function() {
var orientationChange = function(evt) {
//Put your code here
if (window.matchMedia("(orientation: landscape)").matches) {
alert("landscape");
}
else {
alert("portrait");
}
window.removeEventListener('resize', orientationChange);