Skip to content

Instantly share code, notes, and snippets.

View LespiletteMaxime's full-sized avatar

LESPILETTE Maxime LespiletteMaxime

View GitHub Profile
#!/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
.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;
@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);
});
/*
@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({
<!DOCTYPE html>
<html>
<body>
<section>
<input id="theData" type="text" placeholder="Enter some text to save" />
</section>
<section>
<h1>Local Storage</h1>
<article>
<label for="localValue">Local Storage: </label>
@LespiletteMaxime
LespiletteMaxime / html5datalist
Created October 7, 2013 11:00
HTML datalist
<input name="frameworks" list="frameworks" />
<datalist id="frameworks">
<option value="MooTools">
<option value="Moobile">
<option value="Dojo Toolkit">
<option value="jQuery">
<option value="YUI">
</datalist>
@LespiletteMaxime
LespiletteMaxime / html5videowithCallback
Created October 7, 2013 10:59
HTML5 Video with flash callback
<video width="640" height="360" controls>
<source src="__VIDEO__.MP4" type="video/mp4" />
<source src="__VIDEO__.OGV" type="video/ogg" />
<object width="640" height="360" type="application/x-shockwave-flash" data="__FLASH__.SWF">
<param name="movie" value="__FLASH__.SWF" />
<param name="flashvars" value="controlbar=over&image=__POSTER__.JPG&file=__VIDEO__.MP4" />
<img src="__VIDEO__.JPG" width="640" height="360" alt="__TITLE__"
title="No video playback capabilities, please download the video below" />
</object>
</video>
@LespiletteMaxime
LespiletteMaxime / validflashembed
Created October 7, 2013 10:59
Valid Flash Embed
<object type="application/x-shockwave-flash"
data="your-flash-file.swf"
width="0" height="0">
<param name="movie" value="your-flash-file.swf" />
<param name="quality" value="high"/>
</object>
@LespiletteMaxime
LespiletteMaxime / emailHTML5RegEx
Created October 7, 2013 10:59
Regexp Pattern for Email Validation
<input type="text" title="email" required pattern="[^@]+@[^@]+\.[a-zA-Z]{2,6}" />
@LespiletteMaxime
LespiletteMaxime / base641x1gif.html
Created October 7, 2013 10:58
Base64 Encode of a 1*1px “spacer” GIF
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7">