Skip to content

Instantly share code, notes, and snippets.

View rayfranco's full-sized avatar

Franco Bouly rayfranco

View GitHub Profile
@ayamflow
ayamflow / gist:b602ab436ac9f05660d9c15190f4fd7b
Created May 9, 2016 19:10
Safari border-radius + overflow: hidden + CSS transform fix
// Add on element with overflow
-webkit-mask-image: -webkit-radial-gradient(white, black);
@silviopaganini
silviopaganini / Gulpfile.js
Last active January 3, 2016 05:39
Gulp require snippet for all devDependencies
gulp = require('gulp');
pkg = require('./package.json');
for (k in pkg.devDependencies) {
v = pkg.devDependencies[k];
a = k.indexOf('gulp-') > -1 ? k.split('gulp-')[1] : k;
GLOBAL[a] = require(k);
}
@SlexAxton
SlexAxton / .zshrc
Last active November 20, 2024 16:12
My gif workflow
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else
@rayfranco
rayfranco / GravatarExtension.php
Last active November 6, 2018 05:30
Twig extension filter that convert email into gravatar url, or secure gravatar url
<?php
// Acme\DemoBundle\Twig\GravatarExtension
namespace Acme\DemoBundle\Twig;
class GravatarExtension extends \Twig_Extension
{
private $secure_request = false;
@Victa
Victa / bookmarklet.js
Created November 27, 2012 13:18
Gisties Bookmarklet
void ((function(){
var parser = document.createElement('a');
parser.href = document.URL;
if(parser.host === 'gist.github.com'){
var id = parser.pathname.split('/').filter(function(e){return e;})[0];
var user = document.querySelector('#owner .name a').innerText;
window.location = 'http://lite.gisti.es/'+user+'/'+id;
}
})());
@nicolas-brousse
nicolas-brousse / index.html
Created February 23, 2012 10:47
simpleAccordion - jQuery - plugin
<html>
<head>
<title>jQuery simple accordion</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="jquery.simpleAccordion.js"></script>
<script type="text/javascript">
$('.accordion').simpleAccordion();
</script>
</head>
<body>
@addyosmani
addyosmani / visibly.js
Created August 3, 2011 12:44
Cross-browser Page Visibility API polyfill
/*!
* isVis - v0.5.5 Aug 2011 - Page Visibility API Polyfill
* Copyright (c) 2011 Addy Osmani
* Dual licensed under the MIT and GPL licenses.
*/
(function () {
window.visibly = {
b: null,
q: document,
@atk
atk / LICENSE.txt
Created June 19, 2011 15:45 — forked from 140bytes/LICENSE.txt
polyfill an ES5-compatible Array.prototype.indexOf
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Alex Kloss <alexthkloss@web.de>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE