Skip to content

Instantly share code, notes, and snippets.

View williamukoh's full-sized avatar
🎧
Wired in... </>

William Ukoh williamukoh

🎧
Wired in... </>
View GitHub Profile
<?php
/*
Plugin Name: The Combiner
Plugin URI: http://dd32.id.au/wordpress-plugins/?plugin=combine-css-js
Description: Combine CSS & JS into one large monolithic file
Author: DD32
Version: 1.0
Author URI: http://dd32.id.au/
*/
@williamukoh
williamukoh / index.html
Created May 5, 2015 09:21
Full width page elements - JS Bin// source http://jsbin.com/lapogiluwe
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
.strip{ background: yellow; color: black; padding:9em; margin-top: 3em; }
.container { width:70%; margin:3em auto; border:1px black dotted; position:relative; height: 500px; -webkit-transform-style: preserve-3d; -moz-transform-style: preserve-3d; transform-style: preserve-3d; }
@williamukoh
williamukoh / gist:e20ef7bbc30723b89e05
Created February 17, 2016 16:38 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@williamukoh
williamukoh / PHPExcel_Basics.md
Created April 7, 2016 17:08 — forked from r-sal/PHPExcel_Basics.md
PHPExcel Notes and code snippets

Basics

Creating a new PHPExcel Object.

    $this->PHPExcel = new PHPExcel();

Working with sheets

Creating a new sheet:

Social Media Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.

Twitter

@williamukoh
williamukoh / avd_bundle.xml
Created May 31, 2016 15:24 — forked from nickbutcher/avd_bundle.xml
An example of the Android xml bundle format for creating an AnimatedVectorDrawable. See https://plus.google.com/+NickButcher/posts/A8KKxnJdg4r
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2016 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@williamukoh
williamukoh / font-stacks.css
Created September 15, 2016 15:12 — forked from danott/font-stacks.css
A collection of nice font stacks.
.fs-garamond {
font-family: Garamond, Baskerville, "Baskerville Old Face", "Hoefler Text", "Times New Roman", serif;
}
.fs-lucida-bright {
font-family: "Lucida Bright", Georgia, serif;
}
.fs-palatino {
font-family: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
@williamukoh
williamukoh / states in nigeria contact form 7
Last active September 18, 2016 16:32
List of Nigerian States Contact Form 7 select drop-down menu
<p>State <br /> [select state1 default:Lagos "== NOT APPLICABLE ==" "Abuja (FCT)" "Abia" "Adamawa" "Akwa Ibom" "Anambra" "Bauchi" "Bayelsa" "Benue" "Borno" "Cross River" "Delta" "Ebonyi" "Edo" "Ekiti" "Enugu" "Gombe" "Imo" "Jigawa" "Kaduna" "Kano" "Katsina" "Kebbi" "Kogi" "Kwara" "Lagos" "Nasarawa" "Niger" "Ogun" "Ondo" "Osun" "Oyo" "Plateau" "Rivers" "Sokoto" "Taraba" "Yobe" "Zamfara"]</p>
add_action('template_redirect', function() {
if( get_query_var('version_id') )
preview();
});
function preview() {
global $post;
if ( ! is_object($post) )