Author: Gregg Lind [email protected]
example coverage report: http://gregglind.github.com/micropilot/coverreport.html
Quick Recipe:
Author: Gregg Lind [email protected]
example coverage report: http://gregglind.github.com/micropilot/coverreport.html
Quick Recipe:
| /* | |
| * sanitize HTML with jQuery based on whitelist | |
| * example: | |
| * sanitizer.sanitize('<a href="foo" class="bar">aaa</a><script>alert("...")</script>', {'a': ['href'], 'strong': []}) | |
| * returns '<a href="foo">aaa</a>' | |
| */ | |
| var sanitizer = {}; | |
| (function($) { | |
| function trimAttributes(node, allowedAttrs) { |
| /* | |
| * parse_link_header() | |
| * | |
| * Parse the Github Link HTTP header used for pageination | |
| * http://developer.github.com/v3/#pagination | |
| */ | |
| function parse_link_header(header) { | |
| if (header.length == 0) { | |
| throw new Error("input must not be of zero length"); | |
| } |
| !function (window) {"use strict"; | |
| // by WebReflection - WTFPL License | |
| var | |
| prefixes = "r webkitR mozR msR oR".split(" "), | |
| process = "process", | |
| nextTick = "nextTick", | |
| i = 0, | |
| p = window[process] || (window[process] = {}) | |
| ; | |
| while (!p[nextTick] && i < prefixes.length) |
| #!/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 | |
| # |
| // Media Queries in Sass 3.2 | |
| // | |
| // These mixins make media queries a breeze with Sass. | |
| // The media queries from mobile up until desktop all | |
| // trigger at different points along the way | |
| // | |
| // And important point to remember is that and width | |
| // over the portrait width is considered to be part of the | |
| // landscape width. This allows us to capture widths of devices | |
| // that might not fit the dimensions exactly. This means the break |
As configured in my dotfiles.
start new:
tmux
start new with session name:
#Techniques for Anti-Aliasing @font-face on Windows
It all started with an email from a client: Do these fonts look funky to you? The title is prickly.
The font in question was Port Lligat Sans from Google Web Fonts.
| Stability ratings: 0-5 | |
| 0 - Deprecated. This feature is known to be problematic, and changes are | |
| planned. Do not rely on it. Use of the feature may cause warnings. Backwards | |
| compatibility should not be expected. | |
| 1 - Experimental. This feature was introduced recently, and may change | |
| or be removed in future versions. Please try it out and provide feedback. | |
| If it addresses a use-case that is important to you, tell the node core team. |