This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>OpenLayers Mobile</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<base href="http://openlayers.org/dev/examples/" /> | |
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0;"> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<link rel="stylesheet" href="style.mobile.css" type="text/css"> | |
<script src="../OpenLayers.mobile.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=yes, width=device-width"/> | |
<style> | |
html, body { | |
display: -webkit-box; | |
-webkit-box-orient: vertical; | |
height: 100%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>test</title> | |
<style> | |
body { | |
margin: 0px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"/> | |
<title>JS Bin</title> | |
<!--[if IE]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
<style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// My nasty code for extreme startup | |
// https://github.com/magnars/norsk-extreme-startup | |
var http = require('http'); | |
var ip = "192.168.42.56"; | |
var products = { | |
"epler": { | |
price: 5 | |
}, | |
"bananer": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){var%20l=location,p=l.pathname.split("/"),g=p[1],e=p[3],u="http://"+l.host+"/"+g+"/messages/send/?event_success=event_new&eventId="+e+"&action=edit&returnUri="+l.href;l.href=u;})(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Fix touch event bug in iOS 4 and Android 4.0 when page is scrolled. | |
* This function will take a touch object (evt.touches[x]) and return | |
* an object litteral with corrected values for clientX and clientY. | |
*/ | |
function fixTouch (touch) { | |
var winPageX = window.pageXOffset, | |
winPageY = window.pageYOffset, | |
x = touch.clientX, | |
y = touch.clientY; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Code from http://www.macrumors.com/2012/09/17/retina-macbook-pro-users-still-complaining-of-image-persistence/ | |
ioreg -lw0 | grep \"EDID\" | sed "/[^<]*</s///" | xxd -p -r | strings -6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// copy-paste into console | |
alert(Array.prototype.slice.call(document.querySelectorAll("#rsvp-list h5 a"),0).sort(function () { return Math.random() -0.5; })[0].innerText); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var queryString = "foo=bar&a=b%C3%B8"; | |
var decode = decodeURIComponent; | |
var paramObj = queryString.split("&").reduce(function (obj, pair) { | |
var keyVal = pair.split("="); | |
var key = keyVal[0]; | |
var val = keyVal[1]; | |
obj[ decode(key) ] = decode(val); | |
return obj; |
OlderNewer