This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('myApp.services', []) | |
.factory('Camera', ['$q', function($q) { | |
return { | |
getPicture: function() { | |
var q = $q.defer(); | |
navigator.camera.getPicture(function(imageURI) { | |
// Do any magic you need |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('myApp.directives', []) | |
.directive('myCanvas', function() { | |
return { | |
// Angular needs to know what type of usage we want to allow for this (attribute, class name, or tag). | |
// For this example, a tag is great. | |
restrict: 'E', | |
// We want to replace the original custom tag with a template | |
replace: true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('myApp', ['ionic']) | |
.config(function($ionicNavProvider)) { | |
$ionicNavProvider.url('/contact/:contactId', { | |
templateUrl: 'contact.html', | |
controller: 'ContactCtrl', | |
extra: {} | |
}) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$http({ | |
method: 'POST', | |
url: apiUrl + '/signup', | |
headers: {'Content-Type': 'application/x-www-form-urlencoded'}, | |
data: data, | |
transformRequest: function(obj) { | |
var str = []; | |
for( var p in obj ) | |
str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p])); | |
return str.join("&"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('maxlynch') | |
/** | |
* A simple ace-editor widget for adding a rich code editor | |
* in place of a textarea with full ngModel support. | |
* | |
* Usage: | |
* | |
* <ace-editor language="javascript" theme="monokai"></ace-editor> | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('myApp', ['ionic']) | |
.directive('menuAndDrawerClose', ['$ionicViewService', function($ionicViewService) { | |
return { | |
restrict: 'AC', | |
require: '?^ionSideMenus,?^drawer', | |
link: function($scope, $element, $attr, ctrls) { | |
$element.bind('click', function(){ | |
ctrls[0] && ctrls[0].close(); | |
ctrls[1] && ctrls[1].close(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npm install -g gulp | |
/ | |
> v8flags@1.0.3 install C:\Users\Max_2\AppData\Roaming\npm\node_modules\gulp\nod | |
e_modules\v8flags | |
> node fetch.js | |
- | |
C:\Users\Max_2\AppData\Roaming\npm\node_modules\gulp\node_modules\v8flags\fetch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
A MongoDB query script. Example output: | |
760 landings | |
69 signups | |
Conversion rate: 9.078947368421053% | |
Campaign conversions: | |
organic: 8.042% - 53/659 | |
betabuild1: 0% - 0/6 | |
betanocodingbuilder: 37.500% - 6/16 | |
betaonlydrag: 50.000% - 2/4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1" /> | |
<title>My App</title> | |
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" /> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"> | |
</script> | |
<script src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"> |
OlderNewer