http://ln.hixie.ch/?start=1037910467&count=1
http://ln.hixie.ch/?start=1137740632&count=1
| /** | |
| * See: http://www.css-101.org/articles/ken-burns_effect/css-transition.php | |
| */ | |
| /** | |
| * Styling the container (the wrapper) | |
| * | |
| * position is used to make this box a containing block (it becomes a reference for its absolutely positioned children). overflow will hide part of the images moving outside of the box. | |
| */ |
| .scrolling-element-class * { | |
| -webkit-transform: translate3d(0,0,0); | |
| } |
| <html> | |
| <head> | |
| <title>I'm learning</title> | |
| <link rel="stylesheet" href="http://code.leafletjs.com/leaflet-0.3.1/leaflet.css" /> | |
| <script src="http://code.leafletjs.com/leaflet-0.3.1/leaflet.js"></script> | |
| <script src="http://zeptojs.com/zepto.js" type="text/javascript"></script> | |
| <script src="map.js" type="text/javascript"></script> | |
| <style> | |
| body {margin: 0; padding: 0; text-align: center;} | |
| #button { -webkit-transition: -webkit-transform 3s ease-in; box-shadow: 0 0 25px #EFEF4D; margin: auto; margin-top: 15px; padding: 3px 6px; height: 20px; width: 200px;} |
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
| var beziers = { | |
| easeInQuad: '.55,.085,.68,.53', | |
| easeInCubic: '.55,.055,.675,.19', | |
| easeInQuart: '.895,.03,.685,.22', | |
| easeInQuint: '.755,.05,.855,.06', | |
| easeInSine: '.47,0,.745,.715', | |
| easeInExpo: '.95,.05,.795,.035', | |
| easeInCirc: '.6,.04,.98, .335', | |
| easeInBack: '.6,-.28,.735,.045', | |
| easeOutQuad: '.25,.46,.45,.94', |
| if (!window.console) { | |
| (function() { | |
| var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", | |
| "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"]; | |
| window.console = {}; | |
| for (var i = 0; i < names.length; ++i) { | |
| window.console[names[i]] = function() {}; | |
| } | |
| }()); | |
| } |
These instructions work for the Raspberry Pi running Raspbian (hard float) and create a hardware optimized version of NodeJS for the Raspberry PI, (and include a working install and NPM!!!):
Install Raspbian - http://www.raspberrypi.org/downloads
Install the necessary dependecies:
sudo apt-get install git-core build-essential(If you just installed git then you need to administer your git identity first, else adding the patches below will fail!!!)
| var require = function (file, cwd) { | |
| var resolved = require.resolve(file, cwd || '/'); | |
| var mod = require.modules[resolved]; | |
| if (!mod) throw new Error( | |
| 'Failed to resolve module ' + file + ', tried ' + resolved | |
| ); | |
| var cached = require.cache[resolved]; | |
| var res = cached? cached.exports : mod(); | |
| return res; | |
| }; |