Skip to content

Instantly share code, notes, and snippets.

@aristretto
aristretto / clean.js
Created March 21, 2014 21:16
Array.prototype.clean
Array.prototype.clean = function(deleteValue) {
for (var i = 0; i < this.length; i++) {
if (this[i] == deleteValue) {
this.splice(i, 1);
i--;
}
}
return this;
};
var arr = [1,1,2];
var arr = arr.filter(function (v, i, a) { return a.indexOf (v) == i }); // dedupe array
@aristretto
aristretto / mixin.transparent-bg-color.scss
Created April 23, 2014 21:06
sass - mixin - transparent background color with IE support
@mixin transparent($color, $alpha) {
$rgba: rgba($color, $alpha);
$ie-hex-str: ie-hex-str($rgba);
background-color: transparent;
background-color: $rgba;
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#{$ie-hex-str},endColorstr=#{$ie-hex-str});
zoom: 1;
}
// Create REM values with PX fall back
//
// Generate a REM with PX fallback from
// $baseFontSize. Enter the desired size based
// on pixels in numerical form. Supports shorthand.
//
// Forked from: http://codepen.io/thejameskyle/pen/JmBjc
//
// @author Greg Rickaby
// @since 1.0

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 13/08/2014 by @aristretto
  • Original post

@aristretto
aristretto / cssdevconf2014resources.md
Last active August 29, 2015 14:07
CSSDevConf 2014 Resources (a partial list).

Resources & cool Links

@aristretto
aristretto / gist:64d5bbac5897cdaff248
Created January 20, 2015 21:42
Useful way to search a given string for any of a list of terms, in python.
def has_search_term(string_to_search):
patterns = re.compile(r'(?:%s)' % '|'.join(list_of_terms))
return bool(patterns.search(string_to_search))
@aristretto
aristretto / SassMeister-input-HTML.html
Last active August 29, 2015 14:21
Generated by SassMeister.com.
<div class="page">
<div class="row">
<div class="hex">
<div class="hexTop"></div>
<div class="hexBottom"></div>
</div>
<div class="hex-2">
<div class="hexTop"></div>
@aristretto
aristretto / SassMeister-input-HTML.html
Last active August 29, 2015 14:21
Generated by SassMeister.com.
<div class="zenefits">
<div class="piece wing-back"></div>
<div class="head">
<div class="piece head-1"></div>
<div class="piece head-2"></div>
<div class="piece head-3"></div>
</div>
@aristretto
aristretto / SassMeister-input-HTML.html
Created May 27, 2015 03:31
Generated by SassMeister.com.
<div id="logo"></div>