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
<?php declare(strict_types=1); | |
namespace App\Enums; | |
use Illuminate\Contracts\Database\Eloquent\CastsAttributes; | |
/** | |
* Simulator for PHP 8 enums to make it easy to upgrade to actual enums when they become available. | |
* The only thing you need to check after upgrading the child class to an enum is | |
* the equality check in the equals method in the implementation. Replace with an actual equality check |
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
<?php | |
declare(strict_types=1); | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command as ConsoleCommand; | |
use Illuminate\Support\Str; | |
use Symfony\Component\Console\Helper\ProgressBar; |
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
#!/bin/bash | |
# This installs all of the necessary base level services | |
# required for Laravel on a fresh instance of Ubuntu 20.04 | |
# To download and run this script click on the "Raw" button and copy the url for the contents of this gist | |
# then run the following two commands: | |
# apt-get update && apt-get install -y curl | |
# curl -sS {paste gist url} | bash | |
export DEBIAN_FRONTEND=noninteractive |
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
{ | |
"scale": 0.00000000938, | |
"speedOfLight": 299792458, | |
"sun": { | |
"name": "The Sun", | |
"mapData": { | |
"iconUrl": "/assets/map/map-icon-sun-new.png", | |
"infoWindowContent": "It is now about the size of a hot air balloon. Use the address input above to move it all to a location you are more familiar with. You can also drag around the Sun's map icon.<br /> <a href=\"https://free3d.com/3d-model/hot-air-balloon-54348.html\" style=\"font-size: 10px\" target=\"_blank\">Hot Air Balloon Courtesy Of Iridesium</a>", | |
"infoWindowImageUrl": "/assets/images/comparisons/thesun.png", | |
"didYouKnow": "The color of the Sun in space is actually mostly white, not yellow or orange. The reason it appears yellow or orange on Earth is due to atmospheric scattering, especially when it is low in the sky." |
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
import S3 from "aws-sdk/clients/s3"; | |
const s3 = new S3({ | |
apiVersion: '2006-03-01', | |
accessKeyId: process.env.AWS_S3_BROWSER_KEY_ID, | |
secretAccessKey: process.env.AWS_S3_BROWSER_SECRET, | |
region: 'us-east-1', | |
params: { Bucket: 'your-default-bucket' } | |
}); |
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
<template> | |
<div class="modal" :class="{show: show}"> | |
<div class="modal-box"> | |
<slot></slot> | |
</div> | |
</div> | |
</template> | |
<script lang="ts"> | |
import Vue from "vue"; |
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
"use strict"; | |
export const addressAutocomplete = { | |
bind(el, binding) { | |
const callback = binding.value; | |
if(callback && typeof callback !== "function") { | |
console.error("Value for google places directive must be a function"); | |
return; | |
} | |
const autocomplete = new google.maps.places.Autocomplete(el, { |
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
<?php | |
use Illuminate\Support\Facades\Schema; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Database\Migrations\Migration; | |
use App\MccCode; | |
class CreateMccCodesTable extends Migration | |
{ | |
/** |
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
<?php | |
namespace App\Rules; | |
use Illuminate\Contracts\Validation\Rule; | |
use GuzzleHttp\Client; | |
use Illuminate\Support\Facades\Log; | |
use Bugsnag\BugsnagLaravel\Facades\Bugsnag; | |
class GoogleRecaptchaToken implements Rule |
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
<template> | |
<div :id="id" class="uploader dropzone"></div> | |
</template> | |
<script> | |
import Dropzone from 'dropzone'; | |
Dropzone.autoDiscover = false; | |
export default { |
NewerOlder