This file contains hidden or 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
| // Put this in app.js | |
| Ti.Facebook.appid = 'xxxxxxxxxxxxx'; | |
| // Add a login button somewhere and put the following code inside it | |
| Parse.FacebookUtils.init({}); | |
| Parse.FacebookUtils.logIn(['publish_stream', 'email', 'read_friendlists', 'publish_actions'], { | |
| success: function(user) { |
This file contains hidden or 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
| /m/register | |
| curl --include \ | |
| --request POST \ | |
| "http://realrider.swanify.com/m/register" \ | |
| -d "forename=Matthew" \ | |
| -d "surname=Lanham" \ | |
| -d "email=mattplanys34@swanify.com" \ | |
| -d "dob=12/12/1985" \ | |
| -d "password=password" \ |
This file contains hidden or 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
| function findZoomRegion(points) { | |
| var nbPtToShow = points.length-1; | |
| var tmpDeltatLat = 0, tmpDeltatLong = 0, maxDeltatLat = 0, maxDeltatLong = 0, centerLat = 0, centerLong = 0; | |
| for(var i = 0; i <= Math.floor(points.length / 2); i++) { | |
| for(var j = nbPtToShow; j >= Math.floor(points.length / 2); j--) { | |
| if(j != i) { | |
| tmpDeltatLat = Math.abs(Math.abs(points[i].latitude) - Math.abs(points[j].latitude)); | |
| if(tmpDeltatLat > maxDeltatLat) { | |
| maxDeltatLat = tmpDeltatLat; |
This file contains hidden or 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
| (function() { | |
| "use strict"; | |
| angular.module("editableModule", ['ng']).directive("editable", function($timeout) { | |
| return { | |
| restrict: "AE", | |
| scope: true, | |
| require:"ngModel", | |
| link: function(scope, element, attrs, ngModel) { | |
| element.editable({ |
This file contains hidden or 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
| # study stream aliases | |
| # Requires https://github.com/caarlos0/timer to be installed. spd-say should ship with your distro | |
| declare -A pomo_options | |
| pomo_options["work"]="45" | |
| pomo_options["break"]="10" | |
| pomodoro () { | |
| if [ -n "$1" -a -n "${pomo_options["$1"]}" ]; then | |
| val=$1 |
OlderNewer