Skip to content

Instantly share code, notes, and snippets.


Milton Jackson iammilton82

View GitHub Profile
iammilton82 / links.html
Last active Sep 1, 2015
Helpful AngularJS links
View links.html
View print-and-console.php
public function printIt($data){
echo "<pre>";
echo "</pre>";
public function console($data){
$data = json_encode($data);
echo "<script type='text/javascript'>console.log($data)</script>";
View gist:211dc146c4c79f47a2cd

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
View gist:658d80544f68ef538ac0
public function getEmbedCode($url)
if (strpos($url, 'youtube') !== FALSE) {
$url_parts = parse_url($url);
parse_str($url_parts['query'], $segments);
return '//' . $segments['v'];
} else if (strpos($url, 'vimeo') !== FALSE) {
iammilton82 / MY_Upload.php
Created Mar 6, 2014
MultiFile Upload function in CodeIgniter
View MY_Upload.php
<!-- LIBRARY -->
if (!defined('BASEPATH')) exit('No direct script access allowed');
class MY_Upload extends CI_Upload {
function uploadmultiple($files, $settings)
$uploaded = array();
iammilton82 / lihe_jobs.xml
Created Sep 20, 2013 Sample XML File
View lihe_jobs.xml
<?xml version="1.0" encoding="UTF-8"?>
<![CDATA[Job Title Here]]>
iammilton82 / the-events-calendar.php
Created Aug 31, 2013
Events Loop for The Events Calendar
View the-events-calendar.php
global $post;
$events = new WP_Query();
$events->query( array('post_type'=> 'tribe_events', 'eventDisplay' => 'all', 'posts_per_page' => 3));
if ( $events->have_posts() ){
echo "<ul>";
while ( $events->have_posts() )
iammilton82 / forcelinks.js
Created May 28, 2013
Force IOS web app links to open in same document
View forcelinks.js
iammilton82 / fixedcss.css
Last active Dec 17, 2015
Fixed scrolling navigation
View fixedcss.css
/* CSS */
body { padding-top:80px; } /* be sure the padding is fron the top of the page to the top of your content */
#header { position: absolute; height:50px; width: 100%; top:20px; left:0; right:0; }
#header.fixed { position: fixed; top:0; }