Skip to content

Instantly share code, notes, and snippets.

View LespiletteMaxime's full-sized avatar

LESPILETTE Maxime LespiletteMaxime

View GitHub Profile
@LespiletteMaxime
LespiletteMaxime / Gulpfile.js
Created August 27, 2014 11:06 — forked from laracasts/Gulpfile.js
Gulp JS testing bootstrap
var gulp = require('gulp');
var phpspec = require('gulp-phpspec');
var run = require('gulp-run');
var notify = require('gulp-notify');
gulp.task('test', function() {
gulp.src('spec/**/*.php')
.pipe(run('clear'))
.pipe(phpspec('', { notify: true }))
.on('error', notify.onError({
@LespiletteMaxime
LespiletteMaxime / validators.php
Last active August 29, 2015 14:11 — forked from elena-kolevska/validators.php
Filter alpha + space Laravel
<?php
/* app/validators.php */
Validator::extend('alpha_spaces', function($attribute, $value)
{
return preg_match('/^[\pL\s]+$/u', $value);
});
/*
.list-group-horizontal .list-group-item {
display: inline-block;
}
.list-group-horizontal .list-group-item {
margin-bottom: 0;
margin-left:-4px;
margin-right: 0;
}
.list-group-horizontal .list-group-item:first-child {
border-top-right-radius:0;
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
@LespiletteMaxime
LespiletteMaxime / .bash_profile
Last active August 29, 2015 14:26 — forked from JeffreyWay/.bash_profile
Prettier git logs
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
@LespiletteMaxime
LespiletteMaxime / chrome-cache-recovery.js
Last active September 6, 2015 09:03 — forked from whatnickcodes/chrome-cache-recovery.js
Quick and dirty script to recover images from chrome cache. Just paste this into your console to automatically download all Scotch.io cached images
// Open chrome://cache/ and paste the following script in the console. Feel free to edit the filter variable
var filter = /cask\.scotch\.io(.)*\.(jpg|jpeg|png|gif)/g;
/*! jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);retu
@LespiletteMaxime
LespiletteMaxime / Browser Detection Apply Classes to HTML Element CSS-Tricks.js
Created November 29, 2012 10:16 — forked from arun057/Browser Detection + Apply Classes to HTML Element CSS-Tricks.js
Javascript : Browser Detection + Apply Classes to HTML Element | CSS-Tricks
// jQBrowser v0.2: http://davecardwell.co.uk/javascript/jquery/plugins/jquery-browserdetect/
//weird characters should be included.
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(c/a))+String.fromCharCode(c%a+161)};while(c--){if(k[c]){p=p.replace(new RegExp(e(c),'g'),k[c])}}return p}('Ö ¡(){® Ø={\'¥\':¡(){¢ £.¥},\'©\':{\'±\':¡(){¢ £.©.±},\'¯\':¡(){¢ £.©.¯}},\'¬\':¡(){¢ £.¬},\'¶\':¡(){¢ £.¶},\'º\':¡(){¢ £.º},\'Á\':¡(){¢ £.Á},\'À\':¡(){¢ £.À},\'½\':¡(){¢ £.½},\'¾\':¡(){¢ £.¾},\'¼\':¡(){¢ £.¼},\'·\':¡(){¢ £.·},\'Â\':¡(){¢ £.Â},\'³\':¡(){¢ £.³},\'Ä\':¡(){¢ £.Ä},\'Ã\':¡(){¢ £.Ã},\'Å\':¡(){¢ £.Å},\'¸\':¡(){¢ £.¸}};$.¥=Ø;® £={\'¥\':\'¿\',\'©\':{\'±\':²,\'¯\':\'¿\'},\'¬\':\'¿\',\'¶\':§,\'º\':§,\'Á\':§,\'À\':§,\'½\':§,\'¾\':§,\'¼\':§,\'·\':§,\'Â\':§,\'³\':§,\'Ä\':§,\'Ã\':§,\'Å\':§,\'¸\':§};Î(® i=0,«=».ì,°=».í,¦=[{\'¤\':\'Ý\',\'¥\':¡(){¢/Ù/.¨(°)}},{\'¤\':\'Ú\',\'¥\':¡(){¢ Û.³!=²}},{\'¤\':\'È\',\'¥\':¡(){¢/È/.¨(°)}},{\'¤\':\'Ü\',\'¥\':¡(){¢/Þ/.¨(°)}},{\'ª\':\'¶\',\'¤\':\'ß Ñ\',\'
@LespiletteMaxime
LespiletteMaxime / .bashrc
Created December 4, 2012 14:20
[BASH] bashrc
## Mon bashrc ##
# Color the hostname
#if [ $HOSTNAME = 'maxime' ]; then
# export HOST_COLOR="\[\033[1;36m\]"
#fi
#if [ $HOSTNAME = 'marvin' ]; then
# export HOST_COLOR="\[\033[1;34m\]"
#fi
#if [ $HOSTNAME = 'leonidas' ]; then
@LespiletteMaxime
LespiletteMaxime / [HTML] Meta Refresh
Created March 29, 2013 11:44
[HTML] Meta Refresh
<meta http-equiv="refresh" content="5;url=http://example.com/" />
@LespiletteMaxime
LespiletteMaxime / [HTML] Meta Tag For Forcing IE 8 to Behave Like IE 7
Created March 29, 2013 11:45
[HTML] Meta Tag For Forcing IE 8 to Behave Like IE 7
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />