Usage:
var player = new Rect(0, 0, 100, 100);
var target = new Rect(50, 50, 100, 100);
player.is = new AABB(player);
player.is.inside(target);
player.is.colliding(target);
player.is.containing(target);
opendb () { | |
[ ! -f .env ] && { echo "No .env file found."; exit 1; } | |
DB_CONNECTION=$(grep DB_CONNECTION .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) | |
DB_HOST=$(grep DB_HOST .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) | |
DB_PORT=$(grep DB_PORT .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) | |
DB_DATABASE=$(grep DB_DATABASE .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) | |
DB_USERNAME=$(grep DB_USERNAME .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) | |
DB_PASSWORD=$(grep DB_PASSWORD .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) |
// Creates a new promise that automatically resolves after some timeout: | |
Promise.delay = function (time) { | |
return new Promise((resolve, reject) => { | |
setTimeout(resolve, time) | |
}) | |
} | |
// Throttle this promise to resolve no faster than the specified time: | |
Promise.prototype.takeAtLeast = function (time) { | |
return new Promise((resolve, reject) => { |
// Creates a new promise that automatically resolves after some timeout: | |
Promise.delay = function (time) { | |
return new Promise((resolve, reject) => { | |
setTimeout(resolve, time) | |
}) | |
} | |
// Throttle this promise to resolve no faster than the specified time: | |
Promise.prototype.takeAtLeast = function (time) { | |
return new Promise((resolve, reject) => { |
class Env { | |
constructor() { | |
this.secrets = {}; | |
return new Proxy(this, { | |
set: this.__set, | |
get: this.__get, | |
}); | |
} |
<?php | |
namespace App\Providers; | |
use Illuminate\Contracts\Routing\UrlGenerator; | |
use Illuminate\Support\ServiceProvider; | |
use Arr; | |
class AppServiceProvider extends ServiceProvider | |
{ |
<?php | |
if (! function_exists('frontend_url')) { | |
function frontendUrl($path = null, $parameters = [], $secure = null) : string { | |
$builder = url(); | |
$builder->forceRootUrl( | |
app()->isProduction() ? 'https://xxxx.xxxx' : 'http://localhost:3000/'; |
Usage:
var player = new Rect(0, 0, 100, 100);
var target = new Rect(50, 50, 100, 100);
player.is = new AABB(player);
player.is.inside(target);
player.is.colliding(target);
player.is.containing(target);
/* | |
Tailwind - The Utility-First CSS Framework | |
A project by Adam Wathan (@adamwathan), Jonathan Reinink (@reinink), | |
David Hemphill (@davidhemphill) and Steve Schoger (@steveschoger). | |
Welcome to the Tailwind config file. This is where you can customize | |
Tailwind specifically for your project. Don't be intimidated by the | |
length of this file. It's really just a big JavaScript object and |
<!-- Button trigger modal --> | |
<button type="button" class="inline-block font-normal text-center px-3 py-2 leading-normal text-base rounded cursor-pointer text-white bg-blue-600" data-toggle="modal" data-target="#exampleModalTwo"> | |
Launch modal two | |
</button> | |
<!-- Modal --> | |
<div class="modal hidden fixed top-0 left-0 w-full h-full outline-none fade" id="exampleModalTwo" tabindex="-1" role="dialog"> | |
<div class="modal-dialog relative w-auto pointer-events-none max-w-lg my-8 mx-auto px-4 sm:px-0" role="document"> | |
<div class="relative flex flex-col w-full pointer-events-auto bg-white border border-gray-300 rounded-lg"> | |
<div class="flex items-start justify-between p-4 border-b border-gray-300 rounded-t"> |
var aws = require('aws-sdk'); | |
aws.config.update({ | |
accessKeyId: 'YOUR_ACCESS_KEY', | |
secretAccessKey: 'YOUR_SECRET_KEY', | |
region: 'us-west-2' | |
}); | |
var ec2 = new aws.EC2(); |