This checklist is used whenever a project is going live at https://spatie.be
- Desktop: test on latest versions of Chrome, IE/Edge, Firefox, Safari
- Mobile: test on latest versions of Mobile Safari, Android
<?php | |
function make_ics( $summary = 'test', $datestart = 1481328000, $dateend = '', $address = null, $uri = 'http://google.com', $description = 'Here is some body', $filename = 'event.ics' ) | |
{ | |
// Variables used in this script: | |
// $summary - text title of the event | |
// $datestart - the starting date (in seconds since unix epoch) | |
// $dateend - the ending date (in seconds since unix epoch) | |
// $address - the event's address | |
// $uri - the URL of the event (add http://) |
#!/usr/bin/env bash | |
# Composer | |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | |
php composer-setup.php | |
php -r "unlink('composer-setup.php');" | |
mv composer.phar /usr/local/bin/composer | |
# Homebrew |
<?php | |
use Illuminate\Support\Carbon; | |
use Illuminate\Support\Facades\Storage; | |
/** | |
* Format phone number to standard US | |
* | |
* @param string $data 9161234567 | |
* @return string (916) 123-4567 | |
*/ |
cd ~ | |
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz | |
tar vxf wkhtmltox-0.12.3_linux-generic-amd64.tar.xz | |
cp wkhtmltox/bin/wk* /usr/local/bin/ | |
#And you can confirm with: | |
#wkhtmltopdf --version |
This checklist is used whenever a project is going live at https://spatie.be
<?php | |
namespace App\Http\Livewire; | |
use App\Models\Event; | |
use Livewire\Component; | |
use Illuminate\Support\Str; | |
use Illuminate\Support\Carbon; | |
use Illuminate\Support\Facades\Cache; |
<div aria-live="polite" aria-atomic="true" x-data="{ | |
toasts: [], | |
remove(id) { | |
{{-- this.toasts.splice(this.toasts.indexOf(toast), 1) --}} | |
this.toasts = this.toasts.filter(t => t.id !== id) | |
}, | |
listen() { | |
let toast = event.detail; | |
let toast_id = (Math.random() + 1).toString(36).substring(7); | |
this.toasts.push({ |