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 / self-publishing.txt
Created Sep 24, 2017
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 Jan 7, 2017 — 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':
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 Apr 17, 2016
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/
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 / wp-pods-vs-ee.php
Created Nov 25, 2015 — forked from bitmanic/wp-pods-vs-ee.php
This file is a comparison between WordPress/Pods and ExpressionEngine. It shows the syntax required to display a list of three featured books on a site's homepage.
View wp-pods-vs-ee.php
<!-- Featuring three books on a site's homepage -->
<!-- The Pods/WordPress way -->
<ul id="featured-books">
<?php
$book = new Pod('book');
$params = array(
'where'=>'t.show_on_homepage = 1',
@iammilton82
iammilton82 / controller.js
Last active Oct 15, 2015
AngularJS Pagination
View controller.js
$scope.pagination = {
currentPage: 0,
itemsPerPage: 10,
maxItems: 0,
maxPages: 1,
};
$scope.pagination.nextPage = function(){
if($scope.pagination.currentPage >= 0){
$scope.pagination.currentPage = $scope.pagination.currentPage + 1;
@iammilton82
iammilton82 / links.html
Last active Sep 1, 2015
Helpful AngularJS links
View links.html
You can’t perform that action at this time.