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
| <template> | |
| <div :id="id" class="uploader dropzone"></div> | |
| </template> | |
| <script> | |
| import Dropzone from 'dropzone'; | |
| Dropzone.autoDiscover = false; | |
| export default { |
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\Traits; | |
| // composer require ralouphie/mimey | |
| use Mimey; | |
| trait GuessesMimeTypesAndExtentions | |
| { | |
| /** | |
| * Guesses the mime type of a file based off of the extension in the file 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
| 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 |
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
| 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
| /* | |
| * 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
| <?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
| 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
| /* | |
| * 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
| /* | |
| * Angular service for exception handling and reporting | |
| * | |
| * @params none | |
| * | |
| * @returns none | |
| */ | |
| ExceptionService.$inject = ['$log', '$http']; |