Skip to content

Instantly share code, notes, and snippets.

View plbabin's full-sized avatar

Pierre-Luc Babin plbabin

View GitHub Profile
@plbabin
plbabin / keybase.md
Created October 1, 2014 13:24
keybase.md

Keybase proof

I hereby claim:

  • I am plbabin on github.
  • I am plbabin (https://keybase.io/plbabin) on keybase.
  • I have a public key whose fingerprint is 352C 46FB 762F 706D 6AC0 7B29 4990 86F4 153F DAC1

To claim this, I am signing this object:

@plbabin
plbabin / gist:5349422
Created April 9, 2013 21:08
My Sublime Text 2 user settings
{
"auto_complete_commit_on_tab": true,
"bold_folder_labels": true,
"color_scheme": "Packages/Base16 Color Schemes/base16-tomorrow.dark.tmTheme",
"file_exclude_patterns":
[
"*-min.js",
"*.min.css",
".DS_Store",
"*.tmproj",
@plbabin
plbabin / tiny.md
Created January 27, 2012 14:39 — forked from remi/tiny.md
Quebec people one-pager websites
@plbabin
plbabin / gist:1186056
Created September 1, 2011 12:23 — forked from remy/gist:350433
Storage polyfill
if (typeof window.localStorage == 'undefined' || typeof window.sessionStorage == 'undefined') (function () {
var Storage = function (type) {
function createCookie(name, value, days) {
var date, expires;
if (days) {
date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
expires = "; expires="+date.toGMTString();
@plbabin
plbabin / gist:908413
Created April 7, 2011 18:47
Small custom jQuery selector that validate if an element has a data attach to himself
$.extend($.expr[':'], {
hasData: function (obj, intStackIndex, arrProperties) {
var arguments = arrProperties[ 3 ];
var $this = $(obj);
var isValid = false;
if(arguments.indexOf('=') > -1){
arguments = arguments.split('=')
if($this.data(arguments[0]) == arguments[1]){
isValid = true;
<?php
function _decode($data)
{
$newdata = array();
foreach($data as $key => $value) {
if(is_array($value)) {
// recursion because the value for checkbox is an array
$newdata[$key] = $this->_decode($value);
} else {
$(document).ready(function(){
$(document.body).delegate('a[href="#"]','click',function(e){
return false;
});
})