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
| /* | |
| * Angular service for working with the edmunds api | |
| * | |
| * How to use: | |
| * 1. Include in controller | |
| * 2. $scope.vehicle = EdmundsService.vehicle | |
| * 3. Put a watcher on $scope.vehicle and send the new value to EdmundsService.updateVehicle(vehicle) | |
| * 4. Check edmundsConfig and constants. Adjust as necessary. | |
| * | |
| * @params $http, ExceptionService |
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
| /* | |
| * Angular Service for authentication | |
| * | |
| * @params none | |
| * | |
| * @returns none | |
| */ | |
| AuthService.$inject = ['$location', 'ExceptionService']; |
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
| /* | |
| * Angular service for exception handling and reporting | |
| * | |
| * @params none | |
| * | |
| * @returns none | |
| */ | |
| ExceptionService.$inject = ['$log', '$http']; |
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
| /* | |
| * Gets the distance in meters from two coordinate objects | |
| * | |
| * @params coord1 (object|required), coord2 (object|required) | |
| * | |
| * @returns int meters | |
| */ | |
| function distanceBetweenCoords(coord1, coord2){ | |
| var R = 6371000; // earth's radius in meters |
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 newlaravel | |
| { | |
| # Modify to suit your own system | |
| YAML=/home/users/Nathan/Homestead.yaml | |
| PROJECTSDIR="/media/nathan/Secondary Storage/Github" | |
| HOMESTEADDIR="/media/nathan/Secondary Storage/Github" | |
| HOSTFILE=/etc/hosts | |
| PROJECTNAME=$1 | |
| # |
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
| <?php | |
| namespace App\Helpers; | |
| /* | |
| * Access the US States in a format of your choosing by simply calling: | |
| * UsStates::getStates(array $format, bool $stateAllCaps, bool $includeTerritories) | |
| * check the getStates method below for more details on how to format | |
| */ | |
| class UsStates | |
| { | |
| public static $usStates = [ |
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
| /* | |
| * A backend service for other services wanting crud operations | |
| * | |
| * @params | |
| * | |
| * @returns none | |
| */ | |
| (function () { |
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
| class Utils { | |
| placeAddressComponents = { | |
| street_number: { | |
| selector: 'street_number', | |
| defaultName: 'long_name', | |
| }, | |
| route: { | |
| selector: 'route', | |
| defaultName: 'short_name', |
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
| var solarSystem = [ | |
| { | |
| name: 'The Sun', | |
| diameter: 1391400000, | |
| distance: 0 | |
| }, | |
| { | |
| name: 'Mercury', | |
| diameter: 4879000, | |
| distance: 57909227000 |
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
| import { Injectable } from '@angular/core'; | |
| import Promise from 'bluebird' | |
| @Injectable() | |
| export class DomScriptLoaderService { | |
| constructor() { } | |
| /** | |
| * Returns a Promise with a boolean value as to whether is was previously loaded or not |
OlderNewer