Skip to content

Instantly share code, notes, and snippets.

keranm :) keranm

Block or report user

Report or block keranm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
keranm / LICENSE
Created Nov 9, 2015 — forked from ajfisher/LICENSE
Preparation for BuzzConf
The MIT License (MIT)
Copyright (c) 2015 ajfisher
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
keranm /
Last active Nov 9, 2015
Preparation for BuzzConf

BuzzConf NodeBost workshop

During this workshop we will be using mbots from Makeblock. These robots are quick to construct but can be used to do a variety of activites including:

  • Control remotely over bluetooth
  • Use distance sensors for obstacle detection
  • Play a tune via a speaker
  • Detect lines and follow them
keranm / gist:8311160
Created Jan 8, 2014
Get the list of company files
View gist:8311160
// lets get a list of the company files - note we use the base API url from the functions file
$companyFileList = getURL( 'http://localhost:8080/accountright' );
// it returns as JSON so lets decode it into a PHP object
$companyFileList = json_decode( $companyFileList );
echo '<h1>Company File list - JSON</h1>';
echo '<pre>'; // simple html tag to roughly render the HTML
keranm / gist:8311095
Last active Jan 2, 2016
Rough example using the getURL to get from MYOB AccountRight Live API in local mode
View gist:8311095
$urlToCall = 'http://localhost:8080/accountright/'.$companyFileID.'/GeneralLedger/GeneralJournal';
// because we are now making a call to a company file we must ALSO include the username and password
// I'm using the hardcoded variables in the functions file
$generalJournal = getURL( $urlToCall, $companyFileUsername, $companyFilePassword );
// it returns as JSON so lets decode it into a PHP object
$generalJournal = json_decode( $generalJournal );
echo '<h1>General Journal - JSON</h1>';
keranm / getURL
Created Jan 8, 2014
This is a very quick CURL based function to GET a URL - specifically for the MYOB AccountRight Live API
View getURL
** The purpose of this function is to call any url we give it
** The function expects at least a URL
** It also can take (optionally) the username and password for the company file
function getURL($url, $companyFileUsername = null, $companyFilePassword = null) {
keranm / gist:5140409
Created Mar 12, 2013
There is a known issue in SqlCE 3.5 ( that occasionally causes the AccountRight API installer to not run correctly. Here is a quick change to MYOB.AccountRight.API.WindowsServiceHost.exe.config (located here C:\Progra…
View gist:5140409
<remove invariant=”System.Data.SqlServerCe.3.5”/>
<add name=”Microsoft SQL Server Compact Data Provider” invariant=”System.Data.SqlServerCe.3.5” description=”.NET Framework Data Provider for Microsoft SQL Server Compact” type=”System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91”/>
keranm / class.myob_oauth.php
Created Feb 16, 2013
This is a basic class written to simplify the oauth token requests for myob AccountRight API
View class.myob_oauth.php
// *********************************************************************
// Sample Written by Keran McKenzie
// Date: Feb 2013
// Provided as sample oauth class for PHP & cURL OAUTH
keranm / put_withCurl.php
Created Jan 29, 2013
PUT with PHP and CURL
View put_withCurl.php
// by Keran McKenzie
// NOTE this assumes you are posting JSON in a variable called $jsonString
// also assumes we have the username & password in variables
// setup Curl
$session = curl_init();
You can’t perform that action at this time.