Skip to content

Instantly share code, notes, and snippets.

View madila's full-sized avatar

Ruben madila

View GitHub Profile
@madila
madila / of-woocommerce-social-sharing.php
Last active April 19, 2018 11:09
OFC Woocommerce Product Social Sharing Drop-In Plugin
<?php
/*
Plugin Name: OFC Sharing Buttons
Description: sharing buttons for content
Version: 0.1
License: GPL
Author: Ruben Madila
Author URI: ollieford.co.uk
*/
@madila
madila / fontFaceLoading.js
Last active April 12, 2017 14:34
Native Font Loading with fallback
/**
* Created by Madila on 12/04/2017.
*/
(function(window){
var assets_url = '/assets/js/';
var fonts = [];
var loSto = {};
try {
// We set up a proxy variable to help with localStorage, e.g. when cookies are disabled
@madila
madila / Laravel PHP7 LEMP AWS.md
Created November 23, 2016 14:25 — forked from santoshachari/Laravel PHP7 LEMP AWS.md
Laravel 5.x on Ubuntu 14.x, PHP 7.x, Nginx 1.9.x

#Steps to install latest Laravel, LEMP on AWS Ubuntu 14.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.

Install PHP 7 on Ubuntu

Run the following commands in sequence.

sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip
/**
* Created by Madila on 05/10/2016.
*/
class Async {
constructor(id) {
this.url = url;
this.id = id;
}
add(url) {
@madila
madila / parallax.js
Last active August 15, 2016 14:19
Parallax Effect code, smooth scroll on IE and Edge and prefixing of properties via window.appbrowser.prefix.css
/**
* Created by Madila on 15/08/2016.
*/
window.appbrowser = {};
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
@madila
madila / lazysizes
Created July 4, 2016 11:00
Lazysizes filter for wordpress post thumbnail attachment
<?php
/**
* Created by PhpStorm.
* User: Madila
* Date: 21/06/2016
* Time: 11:58
*/
add_filter('wp_get_attachment_image_attributes', 'lazysizes_data_src', 3);