Skip to content

Instantly share code, notes, and snippets.

@ZeeAgency
ZeeAgency / dabblet.css
Created January 2, 2012 12:16
The -Webkit-scrollbar challenge
/**
* The -Webkit-scrollbar challenge
* * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Make the first div’s scrollbar like the second’s
* without changing the styling of the div (i.e. you
* can only change the ::-webkit-scrollbar-* rules
* * * * * * * * * * * * * * * * * * * * * * * * * * * *
* It doesn't matter if the second div doesn't look the same
* after your changes, it's only there to show you how the
@ZeeAgency
ZeeAgency / dabblet.css
Created January 2, 2012 12:12 — forked from LeaVerou/dabblet.css
The -Webkit-scrollbar challenge
/**
* The -Webkit-scrollbar challenge
* * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Make the first div’s scrollbar like the second’s
* without changing the styling of the div (i.e. you
* can only change the ::-webkit-scrollbar-* rules
* * * * * * * * * * * * * * * * * * * * * * * * * * * *
* It doesn't matter if the second div doesn't look the same
* after your changes, it's only there to show you how the
@ZeeAgency
ZeeAgency / modernizr.unicode.js
Created December 6, 2011 08:57
Modernizr Unicode character detection plugin
/**
* Unicode special character support
*
* Detection is made by testing missing glyph box rendering against star character
* If widths are the same, this "probably" means the browser didn't support the star character and rendered a glyph box instead
* Just need to ensure the font characters have different widths
*/
Modernizr.addTest('unicode', function() {
@ZeeAgency
ZeeAgency / inline_example.scss
Created November 2, 2011 14:56 — forked from chriseppstein/inline_example.scss
generate an inline sprite.
@include "icon/*.png";
#{$icon-sprite-base-class} {
background-image: inline-sprite($icon-sprites);
}
@ZeeAgency
ZeeAgency / mouette.js
Created September 27, 2011 14:48
Question Backbone pour Neiluj
var mouetteView = Backbone.View.extend({
el: '#mouette-container',
initialize: function() {
this.mouettes = new mouetteList(); // (collection de mouettes)
this.mouettes.bind('all', this.render, this);
this.mouettes.fetch();
this.template = _.template($('#mouette-template').html());
},
@ZeeAgency
ZeeAgency / gist:1044377
Created June 24, 2011 07:23
HTML5 Volume Control Detection Modernizr Plugin
// Apple decided to not give control of <audio> & <video> volume...
Modernizr.addTest('volume', function() {
// Tested Element
var test = document.createElement('audio');
test.volume = 0.5;
return Modernizr.audio && test.volume === 0.5;
@ZeeAgency
ZeeAgency / LICENSE.txt
Created June 23, 2011 23:16 — forked from 140bytes/LICENSE.txt
dependency management
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
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
@ZeeAgency
ZeeAgency / jquery.ajaxlog.js
Created May 23, 2011 13:00
jQuery AJAX Log
$.ajaxPrefilter(function(options, original, jqXHR) {
console.info('AJAX', options.type.toUpperCase(), options.url, options, jqXHR);
});
@ZeeAgency
ZeeAgency / gist:948808
Created April 29, 2011 19:00
CSS Scrollbar detection Modernizr plugin
// Works only with Modernizr 1.8pre+
Modernizr.addTest('cssscrollbar', function() {
// Tested Element
var test = document.createElement('div'),
// Fake body
fake = false,
root = document.body || (function () {
@ZeeAgency
ZeeAgency / Who is listening ?
Created January 31, 2011 13:27
Little ugly jQuery snippet detecting which nodes are listening to click events
var listenedNodes = [];
$('*').each(function() {
if($(this).data('events') && $(this).data('events').click && $(this).data('events').click.length) {
listenedNodes.push(this);
}
});