Skip to content

Instantly share code, notes, and snippets.

@justin-c-rounds
justin-c-rounds / iTemplate.html
Created March 26, 2012 17:21
Template for iOS web applications and games
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- enable "add to home screen" feature -->
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- set background color of status bar, either default (standard grey), black (black with white text), or black-translucent (like black but partially transparent and content slips beneath instead of starting just below) -->
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<!-- viewport configuration (see http://developer.apple.com/library/ios/#DOCUMENTATION/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html) for more info -->
<meta name="viewport" content="initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
@clauswitt
clauswitt / Blog This.scpt
Created March 13, 2012 14:49
Applescript to create a (jekyll) blogpost from Launchbar and open it in Sublime Text
on replaceString(theText, oldString, newString)
local ASTID, theText, oldString, newString, lst
set ASTID to AppleScript's text item delimiters
try
considering case
set AppleScript's text item delimiters to oldString
set lst to every text item of theText
set AppleScript's text item delimiters to newString
set theText to lst as string
end considering
@scottkellum
scottkellum / normalized.html
Created December 6, 2011 14:58
pixel normalization
<!doctype html>
<html>
<head>
<!-- Encoding -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"></meta>
@brysmi
brysmi / pinboard-full.js
Created August 30, 2011 05:23 — forked from BenWard/pinboard-full.js
A smarter bookmarklet for Pinboard.in; wraps selected text in <blockquote> tags, keeps variables out of the global scope, supports filling tags from rel="tag" markup in the page, and titles from hAtom entry titles. (brysmi) I've added meta "description"
javascript: (function() {
// Change `silent` to true to invoke the promptless, self-closing
// version of the bookmarklet.
var silent = false;
var url = location.href;
var title = document.title;
// uncommment to open your pinboard page in chrome
// var re = new RegExp("^chrome://(.*)");
@madrobby
madrobby / LICENSE.txt
Created August 1, 2011 21:34 — forked from 140bytes/LICENSE.txt
lettering.js
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Thomas Fuchs <http://mir.aculo.us/>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@kylebarrow
kylebarrow / example.html
Created June 23, 2011 06:30
Prevent links in standalone web apps opening Mobile Safari
<!DOCTYPE html>
<head>
<title>Stay Standalone</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<script src="stay_standalone.js" type="text/javascript"></script>
</head>
<body>
<ul>
<li><a href="http://google.com/">Remote Link (Google)</a></li>
@jordandobson
jordandobson / CLS.js
Created June 8, 2011 00:15
Mobile JavaScript Library for HTML Class Attribute Manipulation
(function(document){
window.CLS = window.CLS || {};
CLS.add = function(el, cn){
if(!CLS.exists(el, cn)){
el.className = el.className ? el.className + ' ' + cn : cn;
}
}