Skip to content

Instantly share code, notes, and snippets.


Aaron K Saunders aaronksaunders

View GitHub Profile
aaronksaunders / snippet1.js
Created February 19, 2014 17:25
Promise enabled ACS Call to get channels that user is subscribed to with Push Notifications
View snippet1.js
var Q = require("q");
* gets the list of all of the channels the specified user
* is subscribed to.
* this function has been promise enabled using the q libraru
* @param {Object} _user - user object from ACS
* @param {Object} _callback - [OPTIONAL] function to call on completion
aaronksaunders / StrongLoop.js
Created February 22, 2014 19:26
Wrapping StrongLoop to make it play nicer with @appcelerator specifically #tialloy - this is just the first hack at it, still need to address ACLs
View StrongLoop.js
exports.definition = {
config : {
adapter : {
type : "restapi",
collection_name : ""
extendModel : function(Model) {
_.extend(Model.prototype, {
aaronksaunders / Google-Map-Directive-in-Ionic.markdown
Last active August 29, 2015 13:57
A Pen by aaron k saunders.
View Google-Map-Directive-in-Ionic.markdown

Google Maps Directive in Ionic

trying to use two tabs with a leaflet directive in each one and as soon as the two maps are rendered in the page... everything seems to lock up.

View RateMe.js
function RateMe(ios_url, goog_url, usecount) {
if(!Ti.App.Properties.hasProperty('RemindToRate')) {
Ti.App.Properties.setString('RemindToRate', 0);
var remindCountAsInt = parseInt(Ti.App.Properties.getString('RemindToRate'), 10);
var newRemindCount = remindCountAsInt + 1;
if(remindCountAsInt === -1) {
// the user has either rated the app already, or has opted to never be
// reminded again.
View Ionic-List-Infinite-scroll-with-button-bar-&-google-map.markdown
View AngularJS-Shopping-List-Widget.markdown

AngularJS Shopping List Widget

AngularJS Shopping List Widget is an AngularJS widget that allows a user to manually enter items of a shopping list, along with prices and coupons, and then print it.

A Pen by Alex Whapham on CodePen.


aaronksaunders / app.js
Created May 17, 2014 03:49
Way too long to figure out how to add post data in $resource in angularjs
View app.js
angular.module('Ionicgram', ['ionic', 'Ionicgram.controllers', ''])
.run(['$ionicPlatform', '$rootScope', '$state', 'UserService', function ($ionicPlatform, $rootScope, $state, UserService) {
$ionicPlatform.ready(function () {
login: "admin",
password: "admin_password"
aaronksaunders /
Last active August 29, 2015 14:01
Why I Wasn't at TiConf NYC 2014

##Why I Wasn't at TiConf

This note is here and not on my company blog because this is personal not about Clearly Innovative

I have been asked a few times why I wasn't at TiConf NYC 2014; the simple answer is because it was made clear... indirectly that I wasn't welcome if I did not buy a ticket and that people involved with the project were upset that I came to a bar where there was a happy hour last year but did not by a ticket.

Let me very clear, I was extrememly dissappointed to hear that a conference that is supposed to be about the community would have that attitude about a community member. I have contributed considerable amount of my personal time and energy to this community. I was actively blogging and supporting the Appcelerator community early on. I have made aquaintances from all around the world where the only place I could have seen them face-to-face was at the conference, but I did not go.

##Why didn't I go.

aaronksaunders / index.html
Created May 23, 2014 21:19
Simple File Upload with Kinvey & AngularJS, more complex example with model and services integration can be found here look in the services.js file
View index.html
<!DOCTYPE html>
<title>Kinvey File Demo</title>
<script src=""></script>
<script src=""></script>
<body ng-app="kinveyUploadApp" ng-controller="MainCtrl">
View IonicCordovaNetwork.js
var myApp = angular.module('myApp').service('CordovaNetwork', ['$rootScope', '$ionicPlatform', '$q', function($rootScope, $ionicPlatform, $q) {
// Get Cordova's global Connection object or emulate a smilar one
var Connection = window.Connection || {
'ETHERNET' : 'ethernet',
'WIFI' : 'wifi',
'CELL_2G' : 'cell_2g',
'CELL_3G' : 'cell_3g',
'CELL_4G' : 'cell_4g',
'CELL' : 'cell',
'EDGE' : 'edge',