Skip to content

Instantly share code, notes, and snippets.

View b-alidra's full-sized avatar

Belkacem Alidra b-alidra

View GitHub Profile
@b-alidra
b-alidra / lazy-loading-images.js
Last active March 31, 2016 14:50 — forked from bennadel/lazy-loading-images.htm
Lazy Loading Image With AngularJS
var app = angular.module( "Demo", [] );
app.directive(
"bnLazySrc",
function( $window, $document ) {
// I manage all the images that are currently being
// monitored on the page for lazy loading.
var lazyLoader = (function() {
// I maintain a list of images that lazy-loading
@b-alidra
b-alidra / le-renew.sh
Last active October 6, 2017 06:45 — forked from bmanojlovic/le-renew.sh
Auto renewal for Let's Encrypt Apache
#!/bin/bash
#================================================================
# Let's Encrypt renewal script for Apache on Ubuntu/Debian
# @author Erika Heidi<erika@do.co>
# Usage: ./le-renew.sh [base-domain-name]
# More info: http://do.co/1mbVihI
#================================================================
domain=$1
le_path='/opt/letsencrypt'
le_conf='/etc/letsencrypt'