Skip to content

Instantly share code, notes, and snippets.

open sourcing when not too busy

Adrien Gibrat adriengibrat

open sourcing when not too busy
View GitHub Profile
adriengibrat / jquery.toascii.js
Last active Dec 17, 2015
Clean up diatrics from strings (convert to ascii)
View jquery.toascii.js
$.toAscii = $.extend(
function toAscii (string) {
$.each(toAscii.diacritics, function(){
string = string.replace(this[1], this[0]);
return string;
}, {
diacritics: [
['A', /[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g],
adriengibrat / l.php
Last active Oct 25, 2019
Extreme minification of shortest possible PSR-0 compliant autoloader, 5 lines !
View l.php
//set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__); // optional
spl_autoload_register(function ($class) {
$file = preg_replace('#\\\|_(?!.+\\\)#','/', $class) . '.php';
if (stream_resolve_include_path($file))
require $file;
adriengibrat / dabblet.css
Created Jan 8, 2013
Gradient Background test
View dabblet.css
* Gradient Background test
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
adriengibrat / fiddle.html
Last active Jul 5, 2016 — forked from jed/LICENSE.txt
View fiddle.html
Page url: <span id="location"></span>
<span class="url"></span> <span>true</span></div>
<div><span class="url"></span> <span>true</span></div>
<div><span class="url">//</span> <span>true</span></div>
<div><span class="url">//</span> <span>true</span></div>
<div><span class="url"></span> <span>false</span></div>
<div><span class="url"></span> <span>false</span></div>
You can’t perform that action at this time.