Skip to content

Instantly share code, notes, and snippets.

@samme
samme / _colors.sh
Created August 16, 2013 20:04
Show a reduced color table for a batch of images (ImageMagick)
convert *.png -append -colors 256 -unique-colors out/colors256.png
@samme
samme / number.js
Created August 10, 2013 23:56
Really simple number methods ☺
define(function (){
'use strict';
var math = Math,
abs = math.abs,
max = math.max,
min = math.min;
return {
absMax: function (a, b){
@samme
samme / _image-rendering.sass
Created August 10, 2013 23:50
Compass mixins for the CSS4 `image-rendering` property with some cross-browser equivalents
=image-rendering($hint)
@if $hint == 'crisp-edges'
@if $legacy-support-for-ie8 or $legacy-support-for-ie7
-ms-interpolation-mode: bilinear
@if $experimental-support-for-webkit
image-rendering: -webkit-optimize-contrast
+experimental-value(image-rendering, crisp-edges, $moz: $experimental-support-for-mozilla, $webkit: false, $o: $experimental-support-for-opera, $ms : false, $khtml: false, $official: true)