Skip to content

Instantly share code, notes, and snippets.

@dghodgson
dghodgson / traceback.sh
Last active May 20, 2018 20:24 — forked from docwhat/traceback_example.bash
A template showing how to do bash tracebacks. This makes using `set -eu` much more comfortable.
# 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
// 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";
}
}