See original gist for discussion and links.
Performance Comparison: http://jsperf.com/url-parsing/5
Test Ops/sec
Regex
// edit for whichever you care about | |
$vendors: 'webkit', 'moz', 'ms'; // 'webkit', 'moz', 'ms', 'o', 'khtml'; | |
/// @summary Repeat for multiple vendor prefixes, like prefix-free processor | |
/// @param $property the property to repeat | |
/// @param $noplain set 'true' to disable prefixless option | |
/// @param $vendors override the global vendor list | |
/// @param $prefix optional additional prefix; supposed to allow keyframe specification with `@` | |
/// | |
/// @see http://css-tricks.com/redesigning-with-sass/ for references | |
@mixin vendorize($property, $value, $noplain: false, $vendors: $vendors, $prefix:'') { |
See original gist for discussion and links.
Performance Comparison: http://jsperf.com/url-parsing/5
Test Ops/sec
Regex
<canvas id='c'></canvas> |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace Ofir.Tools.Reflection | |
{ | |
public static class AttributeExtensions | |
{ | |
public static IEnumerable<T> GetCustomAttributes<T>(this MemberInfo memberInfo, bool inherit = false) where T : Attribute | |
{ |
<div class="header-wrapper"> | |
<header class="group"> | |
<h1>Style Tile<br>Template</h1> | |
<hgroup class="project-title"> | |
<h2>Project name</h2> | |
<h3>Style tile</h3> | |
<h4>Version 1</h4> | |
</hgroup> | |
</header> | |
</div> |
# clone repository to current working directory (cwd) | |
git clone "{{repo}}" . | |
# clone a repository to the current directory, "symlinking" git files elsewhere, checking out single file | |
git clone -n --separate-git-dir="{{extpath}}\{{ProjectName}}" "{{path}}\{{ProjectName}}" . | |
git checkout HEAD {{file}} | |
## Explanation: | |
## 1. git | |
## clone | |
## -n no files checked out, just history; could use `--bare` as well? |
/* jQuery Tinier Pub/Sub - v0.9 - 2013-02-11 | |
* original by http://benalman.com/ 10/27/2011 | |
* Original Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */ | |
(function($) { | |
// "topic" holder | |
var o = $({}); // use $('<b>') with Zepto, as it doesn't like {} ? | |
// attach each alias method |
// simplest, "original": 234 char | |
!window.requestAnimationFrame && (window.requestAnimationFrame = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || window.oRequestAnimationFrame || function (callback) { window.setTimeout(callback, 1000 / 60) }); | |
// compressible simplest: 157 char | |
(function(w,anif) { | |
if(!w['r' + anif]) w['r' + anif] = w['webkitR' + anif] || w['mozR' + anif] || w['msR' + anif] || w['oR' + anif] || function (callback) { w.setTimeout(callback, 1000 / 60) }; | |
})(window, 'equestAnimationFrame'); | |
%h1.elegantshadow Elegant Shadow | |
%h1.deepshadow Deep Shadow | |
%h1.insetshadow Inset Shadow | |
%h1.retroshadow Retro Shadow |
// needs some kind of reset? | |
body { padding:0px; margin:0px; } | |
@import "compass-includes"; | |
@import "grid-helpers"; | |
@import "grid-core"; | |
// USAGE | |
// ============ |