Skip to content

Instantly share code, notes, and snippets.

@laurentgoudet
laurentgoudet / lgGuardpost.js
Created August 1, 2014 08:25
MailGun's Guardpost email validation directive for AngularJS - How to create Async directives with $validators in Angular >= v1.3.0-beta.16
'use strict';
/* jshint camelcase: false */
angular.module('lgValidation')
// Uses the Guardpost API from MailGun to validation the
// email addresses and provide suggestions
.directive('lgGuardpost', function($http, $document,
MAILGUN_BASE_URL, MAILGUN_API_KEY) {
return {
require: 'ngModel',
link: function(scope, element, attrs, ctrl) {
@laurentgoudet
laurentgoudet / cVimrc
Last active August 29, 2015 14:07
cVimrc
" Settings
set nohud
set nosmoothscroll
let barposition = "bottom"
let completionengines = ["google", "amazon", "imdb"]
let searchalias g = "google"
let blacklists = ["https://mail.google.com/*", "*://*.reddit.com/*"]
let mapleader = ","
" Mappings
@laurentgoudet
laurentgoudet / visibly.js
Created May 15, 2017 09:15 — forked from addyosmani/visibly.js
Cross-browser Page Visibility API polyfill
/*!
* isVis - v0.5.5 Aug 2011 - Page Visibility API Polyfill
* Copyright (c) 2011 Addy Osmani
* Dual licensed under the MIT and GPL licenses.
*/
(function () {
window.visibly = {
b: null,
q: document,
@laurentgoudet
laurentgoudet / visibly.js
Created May 15, 2017 09:15 — forked from addyosmani/visibly.js
Cross-browser Page Visibility API polyfill
/*!
* isVis - v0.5.5 Aug 2011 - Page Visibility API Polyfill
* Copyright (c) 2011 Addy Osmani
* Dual licensed under the MIT and GPL licenses.
*/
(function () {
window.visibly = {
b: null,
q: document,