Skip to content

Instantly share code, notes, and snippets.

View graciano's full-sized avatar

Graciano graciano

View GitHub Profile
@graciano
graciano / zIndex-bookmarklet.js
Created June 20, 2018 14:50 — forked from paulirish/zIndex-bookmarklet.js
find all elements with a z-index and indicate what they are.
// find all elements with a z-index and indicate what they are.
// uses css outline which is not supported in IE <8
function contrast(color){ return '#' +
(Number('0x'+color.substr(1)).toString(10) > 0xffffff/2 ? '000000' : 'ffffff');
}
jQuery('*')
.filter(function(){ return $(this).css('zIndex') !== 'auto'; })
.each(function(){
@graciano
graciano / README.md
Last active May 31, 2017 15:39 — forked from NandoSangenetto/README.me
Compress and convert images

Convert images to webp from folder

Installation

You need to download libwebp and put in the shell script folder. You must have installed the jpegoptim, giflossy (gifsicle), pngquant and imagemagick library.

Usage

  • Convert folder and put results in the results folder:
@graciano
graciano / baseConverter.js
Last active November 6, 2015 14:04 — forked from faisalman/baseConverter.js
Convert From/To Binary/Decimal/Hexadecimal in JavaScript
/**
* Conver From/To Binary/Decimal/Hexadecimal in JavaScript
* Matheus Graciano <graciano.dev@gmail>, Lucas Gonzalez <lucasmgonzalez1992@gmail.com>
*
* Adapted from
* https://gist.github.com/faisalman/4213592
*
* Copyright 2012-2015, Faisalman <fyzlman@gmail.com>
* Licensed under The MIT License
* http://www.opensource.org/licenses/mit-license