Skip to content

Instantly share code, notes, and snippets.

View aaronksaunders's full-sized avatar

Aaron K Saunders aaronksaunders

View GitHub Profile
@aaronksaunders
aaronksaunders / _readme.md
Last active November 26, 2015 09:28
Simple File Upload Pt 2: with Associated Object Kinvey + Angular (User, Files,Data)

Simple File Upload with Associated Object Kinvey + Angular

###Setup Kinvey

###Initialize & Login

###Upload File

###Create Parent Object

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',
@aaronksaunders
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 http://bit.ly/1hv64Xq look in the services.js file
<!DOCTYPE html>
<html>
<head>
<title>Kinvey File Demo</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.9/angular.min.js"></script>
<script src="https://da189i1jfloii.cloudfront.net/js/kinvey-angular-1.1.4.min.js"></script>
</head>
<body ng-app="kinveyUploadApp" ng-controller="MainCtrl">
@aaronksaunders
aaronksaunders / note.md
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
aaronksaunders / app.js
Created May 17, 2014 03:49
Way too long to figure out how to add post data in $resource in angularjs
angular.module('Ionicgram', ['ionic', 'Ionicgram.controllers', 'Ionicgram.services'])
.run(['$ionicPlatform', '$rootScope', '$state', 'UserService', function ($ionicPlatform, $rootScope, $state, UserService) {
$ionicPlatform.ready(function () {
UserService.login({
login: "admin",
password: "admin_password"
},function(_result){

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.

License.

@aaronksaunders
aaronksaunders / controllers.js
Last active November 9, 2018 04:51
Accessing MongoDB Example Ionic Framework - based on hello sample
angular.module('starter.controllers', [])
.controller('DashCtrl', function ($scope) {
})
.controller('FriendsCtrl', function ($scope, Friends) {
Friends.init()
.then(function (_data) {
console.log(_data.data.deployment_id);
Friends.all().then(function (_data) {
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.