Skip to content

Instantly share code, notes, and snippets.

Avatar

Milton Jackson iammilton82

View GitHub Profile
View 1-pods-loop-general-example.php
<?php
//set up pods::find parameters to limit to 5 items
$param = array(
'limit' => 5,
);
//create pods object
$pods = pods('pod_name', $params );
//check that total values (given limit) returned is greater than zero
if ( $pods->total() > 0 ) {
@iammilton82
iammilton82 / mailgun-sample.php
Created April 17, 2016 04:21
Mailgun APi Sample
View mailgun-sample.php
class Mailgun {
function post($headers, $url, $data){
$handle = curl_init();
curl_setopt($handle, CURLOPT_URL, $url);
curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);
curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
curl_setopt($handle, CURLOPT_POST, true);
curl_setopt($handle, CURLOPT_POSTFIELDS, $data);
@iammilton82
iammilton82 / self-publishing.txt
Created September 24, 2017 19:14
Tips to Self Publishing
View self-publishing.txt
The most important things to start with:
A title and a one to two paragraph description of your book. You'll need it for almost every step of this process. You'll also need to identify how you'll publish (book, e-book, both?) and the price for each of those platforms.
1. Establish a Publishing Company (Optional)
Creating a publishing company is a simple as registering a business or local trade entity/name at your town hall office. You can also scale up to a larger business however the local trade establishes your publishing brand as "Publishing Company Books" or whatever name you'd like.
2. Register for your ISBN number
The ISBN number is a unique identifier for your book. It is widely used throughout every library and online store to catalog your book. ISBNs should be purchased through Bowker. Don't buy them anywhere else, if you do, they tend to be third parties just buying them from Bowker anyway. If you plan on publishing more than 1 book, I'd recommend buying a block of 10.
https://www.myidentifiers
@iammilton82
iammilton82 / memorySizeOfObject.js
Created January 7, 2017 17:35 — forked from zensh/memorySizeOfObject.js
calculate memory size of javascript object, it is not a accurate value!
View memorySizeOfObject.js
function memorySizeOf(obj) {
var bytes = 0;
function sizeOf(obj) {
if(obj !== null && obj !== undefined) {
switch(typeof obj) {
case 'number':
bytes += 8;
break;
case 'string':
@iammilton82
iammilton82 / 2016-10-21
Last active October 21, 2016 15:34
Share + Tell
View 2016-10-21
Google Pixel - https://madeby.google.com/phone/
Cybathlon 2016 (Zurich) - https://www.youtube.com/watch?v=Rx9I_hYqQcM
SlideBot - https://slidebot.io/pro/#
@iammilton82
iammilton82 / nodejs.txt
Last active April 17, 2016 04:39
NodeJS Tutorials + Notes
View nodejs.txt
Build a RESTful API: https://scotch.io/tutorials/build-a-restful-api-using-node-and-express-4
Promises: https://strongloop.com/strongblog/promises-in-node-js-with-q-an-alternative-to-callbacks/
@iammilton82
iammilton82 / lihe_jobs.xml
Created September 20, 2013 17:59
LatinosInHigherEd.com Sample XML File
View lihe_jobs.xml
<?xml version="1.0" encoding="UTF-8"?>
<jobs>
<job>
<id>2342342</id>
<action>add</action>
<user_id>116555</user_id>
<start>2007-08-30</start>
<expire>2007-08-30</expire>
<position>
<![CDATA[Job Title Here]]>
@iammilton82
iammilton82 / the-events-calendar.php
Created August 31, 2013 12:23
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() )
{