This files contains my boilerplates for jQuery plugins.
# The configfile is divided into three parts; | |
# 1) serversettings | |
# 2) rules | |
# 3) routes | |
# | |
# The recommended order is: | |
# Serversettings: | |
# logoutput | |
# internal | |
# external |
Problem : you can't attach DOM style mouse events (over, out, click…) on elements drawn onto a element.
Solution : Heatmaps ! When drawing onto the <canvas/>
, do the same onto a "hidden" map canvas that will NEVER be inserted into the DOM. Assign random colors to the elements drawn to the map, then add regular DOM events to the visible element. When an event fire up, compare coordinates of the mouse in the <canvas/>
, to the map, detect the color to find the element on which the event apply, then fire the custom event stack.
So simple isn't it ? Hack you said ;) ?
Wait… It's just JavaScript !
#!/bin/sh | |
ISSUE=$(git symbolic-ref HEAD 2> /dev/null | cut -b 14-) | |
COLS=$((${#ISSUE} + 10)) | |
subl -n -w "$*:1:$COLS" |
/* Compass HiDPI sprite helper | |
* | |
* Pre-requisites : | |
* - the hidpi sprite images needs to be in a folder near the standard one, and | |
* named **<name>_hidpi** (e.g. **images/icons** and **images/icons_hidpi**) | |
* | |
* @author : MAD <[email protected]> | |
*/ | |
// ****************************************************************************/ |
// CSS TRANSITIONS ------------------------------------------------------------/ | |
// I pass 2 args to the method but the second one is only here to prevent | |
// LessCSS to this bloody trick that @arguments return an array if there's two | |
// args but a string when there's only one oO'… | |
.transition (@param, @fakeParam:X, ...) | |
{ | |
// Explode arguments and remove the fakeParam | |
@args : ~`"@{arguments}".replace(/[\[\]]|\sX/g, '')`; | |
// Specify prefixable properties seperated with commas | |
// i.e.: ~"transform,opacity" |
.radial-gradient(@position, @cover, @begin, @end, ...) { | |
@props: ~`"@{arguments}".replace(/[\[\]]/g, '')`; | |
@stop_color: ~`"@{props}".split(/[\s,]+/).slice(-2, -1)`; | |
background-color: @stop_color; | |
background: -webkit-radial-gradient(@props); | |
background: -moz-radial-gradient(@props); | |
background: -ms-radial-gradient(@props); | |
background: -o-radial-gradient(@props); | |
background: radial-gradient(@props); |
This is my personal guide to restore my configuration and setup my system for a fresh install. I use it and keep it updated frequently. Hope it will inspire you on your own way =].
Before a fresh reinstall, don't forget to backup many things. A regular ghost made with CarbonCopyCloner or Clonezilla is a good solution, but if you can't, you should save the following:
function getParams() { | |
var href, | |
paramList, | |
arg, | |
refs = {}; | |
href = document.defaultView.location.href; | |
if ( -1 != href.indexOf("?") ) | |
{ | |
paramList = href.split("?")[1].split(/&|;/); |