Skip to content

Instantly share code, notes, and snippets.

View Ema4rl's full-sized avatar

Harrison Emmanuel Ema4rl

View GitHub Profile
@Ema4rl
Ema4rl / API_Controller.php
Last active May 14, 2017 01:58
Codeigniter Restserver DELETE method with request body [HACK]
require APPPATH.'libraries/REST_Controller.php';
class API_Controller extends REST_Controller
{
/**
* Parse the DELETE request arguments [HACK]
*
* @access protected
@Ema4rl
Ema4rl / aspect-ratio.js
Last active August 26, 2016 00:00
A custom UIkit component for scrollable images on hover
(function(addon) {
var component;
if (window.UIkit) {
component = addon(UIkit);
}
if (typeof define == "function" && define.amd) {
define("uikit-aspect-ratio", ["uikit"], function(){
return component || addon(UIkit);
@Ema4rl
Ema4rl / MY_Upload.php
Last active May 28, 2018 05:31
CodeIgniter MY_Upload Extension to create filepath directory if not exist and make it really writable
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* File Uploading Class Extension
*
* @package CodeIgniter
* @subpackage Libraries
* @category Uploads
* @author Harrison Emmanuel (Eharry.me)
@Ema4rl
Ema4rl / ssbg-slideshow.js
Last active January 18, 2020 18:43 — forked from ki11ua/Super simple background image slideshow.css
Super Simple jQuery Background-image Slideshow (using CSS3 for the transition, gets the image paths via HTML5 `data` attribute, and with image preload trick).
/*!
* By Eharry.me (https://gist.github.com/Ema4rl/b8ef90be99205ddada5ef2cd6e632ebe)
*/
! function ($) {
"use strict";
var slide = $("[data-slides]"),
count = 0,
slides = slide.data("slides"),
len = slides.length,
n = function () {