Skip to content

Instantly share code, notes, and snippets.

@zaus
zaus / _vendorize.scss
Last active October 11, 2015 23:58 — forked from heroheman/gist:3907611
SASS: Vendorize Mixin with editable vendors
// 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:'') {
@zaus
zaus / jsperf-results.md
Created October 24, 2012 21:25 — forked from jlong/uri.js
URI Parsing with Javascript - regex version

See original gist for discussion and links.

Performance Comparison: http://jsperf.com/url-parsing/5

Testing in Chrome 22.0.1229.94 32-bit on Windows Server 2008 R2 / 7 64-bit

Test Ops/sec

Regex

@zaus
zaus / index.html
Created November 19, 2012 14:49
A CodePen by AKM2. Lightning -- had to save a copy because this is awesome.
<canvas id='c'></canvas>
@zaus
zaus / AttributeExtensions.cs
Last active December 10, 2015 21:18
Some useful extension methods for dealing with enum flags (bitwise operations). Found at (Ofir's Blog)[http://ofirzeitoun.wordpress.com/2012/10/11/i-like-enum-enums-extension-methods/]
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
{
@zaus
zaus / index.html
Created January 16, 2013 14:38
A CodePen by Jerad Gallinger. Style tiles with SCSS - Design style tiles in the browser with SCSS! Fork this in CodePen and make your own tiles. Share your tiles with clients with the Full Page link. Go CodePen Pro and update styles on the fly in Live View in a meeting with your client. It's responsive, too. Get your in-browser design on. On Git…
<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>
@zaus
zaus / commands.bash
Last active December 12, 2015 06:59
Common GIT commands for different scenarios?
# 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?
@zaus
zaus / jquery.tinierpubsub.js
Last active December 12, 2015 10:08 — forked from cowboy/HEY-YOU.md
/* 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
@zaus
zaus / OtherRAFShims.js
Last active December 14, 2015 13:19 — forked from mrdoob/RequestAnimationFrame.js
Exploring simpler `requestAnimationFrame` shims
// 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');
@zaus
zaus / index.haml
Created March 12, 2013 16:27
A CodePen by Jorge Epuñan. CSS3 text-shadow effects
%h1.elegantshadow Elegant Shadow
%h1.deepshadow Deep Shadow
%h1.insetshadow Inset Shadow
%h1.retroshadow Retro Shadow
@zaus
zaus / _breakpoint.scss
Last active December 14, 2015 22:58
lesjames/Breakpoint minimal install
// needs some kind of reset?
body { padding:0px; margin:0px; }
@import "compass-includes";
@import "grid-helpers";
@import "grid-core";
// USAGE
// ============