A few tips for shaving some bytes off your JS demos. I will probably add more to this list in the future.
26B:
new Option(html).innerHTML
| #!/usr/bin/env node | |
| var http = require('http') | |
| , webapp = require('webapp'); | |
| http.createServer(webapp.bind([])).listen(8000); | |
| // ^^^^^^^^^^^^^^^ | |
| // | (x) | |
| // ROFLSCALE DEQUE ---/ |
| Document.prototype.createStyleSheet = function (rules) { | |
| var stylesheet = this.documentElement.appendChild( | |
| this.createElementNS("http://www.w3.org/1999/xhtml", "style") | |
| ).sheet; | |
| stylesheet.insertRule("@media all{" + rules + "}", 0); | |
| return stylesheet; | |
| }; |
| <!DOCTYPE html> | |
| <!-- | |
| This is a simple experiment relying on ECMAScript 6 Proxies. To try this out, | |
| use Aurora (http://www.mozilla.org/en-US/firefox/channel/). | |
| The goal was to create a HTML writer where the method names were really just | |
| the HTML tags names, but without manually creating each method. This uses | |
| a Proxy to create a shell to an underlying writer object that checks each | |
| method name to see if it's in a list of known tags. |
| index.html: docs/index.md | |
| markdown < $< \ | |
| | cat head.html - tail.html \ | |
| > $@ |
| $gutter: 10px; | |
| $grid-unit: 60px; | |
| %clearfix { | |
| *zoom: 1; | |
| &:after { | |
| content: "\0020"; | |
| display: block; | |
| height: 0; | |
| clear: both; |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2012 subzey <[email protected]> | |
| 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 |
| <!doctype html> | |
| <!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ --> | |
| <html> | |
| <head> | |
| <title>iOS 8 web app</title> | |
| <!-- CONFIGURATION --> |
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
An ongoing project to catalogue all of these sneaky, hidden, bleeding edge selectors as I prepare my JSConf EU 2012 talk.
Everything is broken up by tag, but within each the selectors aren't particularly ordered.
I have not tested/verified all of these. Have I missed some or got it wrong? Let me know. - A
A friendly reminder that you may need to set this property on your target/selected element to get the styling results you want:
-webkit-appearance:none;