Skip to content

Instantly share code, notes, and snippets.

View Grsmto's full-sized avatar

Adrien Denat Grsmto

View GitHub Profile
@Grsmto
Grsmto / Export Layers To Files.jsx
Created July 30, 2014 11:01
Photoshop script 'Export Layers To Files' with clean files name
// Copyright 2007. Adobe Systems, Incorporated. All rights reserved.
// This script will export each layer in the document to a separate file.
// Written by Naoki Hada
// ZStrings and auto layout by Tom Ruark
/*
@@@BUILDINFO@@@ Export Layers To Files.jsx 1.0.0.17
*/
/*
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
/*
A slightly more automated approach to BEM modifier classes:
using '&' parent selector interpolation, modifiers extend their bases,
so that HTML markup requires only the modifier class not the base *and* modifier
*/
@Grsmto
Grsmto / index.html
Created June 23, 2013 19:07
Chrome Android pixel snapping test
<!DOCTYPE html>
<!--[if IEMobile 7 ]> <html class="no-js iem7"> <![endif]-->
<!--[if (gt IEMobile 7)|!(IEMobile)]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<title></title>
<meta name="description" content="">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1">
@Grsmto
Grsmto / gist:4478209
Created January 7, 2013 20:41
Javascript - "arguments.callee" technique : this value points to the anonymous function in which the code is executing.
var todo = items.concat(); //create a clone of the original array
setTimeout(function(){
//get next item in the array and process it
process(todo.shift());
//if there's more items to process, create another timer
if(todo.length > 0){
setTimeout(arguments.callee, 25); // arguments.callee = anonymous function where the code is executing
} else {