Skip to content

Instantly share code, notes, and snippets.

View damien-list's full-sized avatar

Damien List damien-list

View GitHub Profile

Keybase proof

I hereby claim:

  • I am damien-list on github.
  • I am damli (https://keybase.io/damli) on keybase.
  • I have a public key ASB69ifxGTLP_3M_UxrYuKAfoPrK7BVQYr3vprJZLOTkhgo

To claim this, I am signing this object:

@damien-list
damien-list / gist:5984941
Created July 12, 2013 14:36
Clientside JS error reporting services
Top 6
bugsense.com
jslogger.com
qbaka.com
muscula.com
errorception.com
exceptionhub.com
Not targeting JS primarily:
exceptional.io
@damien-list
damien-list / gist:4233569
Created December 7, 2012 14:27
Vérifier une adresse e-mail
function is_email(id){return (/^([w!.%+-*])+@([w-])+(?:.[w-]+)+$/).test(id);}
@damien-list
damien-list / gist:3749365
Created September 19, 2012 12:22
Input & Textarea Character Limit Display with jQuery
(function($) {
$.fn.extend( {
limiter: function(limit, elem) {
$(this).on("keyup focus", function() {
setCount(this, elem);
});
function setCount(src, elem) {
var chars = src.value.length;
if (chars > limit) {
src.value = src.value.substr(0, limit);
@damien-list
damien-list / gist:3743975
Created September 18, 2012 16:07
Test if AdBlock activated
<div id="ads_bottom" style="position: absolute; bottom: 0; right: -5000px; width: 100px; height: 100px;"></div>
onload = function() {
if (document.getElementById('ads_bottom').offsetHeight == 0) {
alert('Désactivez AdBlock !');
}
}
@damien-list
damien-list / gist:3498222
Created August 28, 2012 13:57
HTML5 Placeholder Fallback using jQuery
$(document).ready(function() {
if ( !("placeholder" in document.createElement("input")) ) {
$("input[placeholder]").each(function() {
var val = $(this).attr("placeholder");
if ( this.value == "" ) {
this.value = val;
}
$(this).focus(function() {
if ( this.value == val ) {
@damien-list
damien-list / gist:3497915
Created August 28, 2012 13:22
Display Errors in a PHP script
<?php
ini_set("display_errors", 1);
error_reporting(E_ALL);
?>