Skip to content

Instantly share code, notes, and snippets.

Avatar

Daniel Hodgson Toasty27

View GitHub Profile
@Toasty27
Toasty27 / traceback.sh
Last active May 20, 2018 — forked from docwhat/traceback_example.bash
A template showing how to do bash tracebacks. This makes using `set -eu` much more comfortable.
View traceback.sh
# Tracebacks in bash
# https://docwhat.org/tracebacks-in-bash/
#
# Just take the code between the "cut here" lines
# and put it in your own program.
#
# Written by Christian Höltje
# Donated to the public domain in 2013
set -eu
View ios-viewport-scaling-bug-fix-original.js
// Original code from http://www.blog.highub.com/mobile-2/a-fix-for-iphone-viewport-scale-bug/
var metas = document.getElementsByTagName('meta');
var i;
if (navigator.userAgent.match(/iPhone/i)) {
for (i=0; i<metas.length; i++) {
if (metas[i].name == "viewport") {
metas[i].content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0";
}
}
You can’t perform that action at this time.