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 | |
/** | |
* event_output_start_end_date | |
* @param string $start_date | |
* @param string $end_date | |
* @return string | |
*/ | |
function event_output_start_end_date($start_date, $end_date) { | |
$start_datetime = strtotime($start_date); // yyyy-mm-dd | |
$end_datetime = strtotime($end_date); // yyyy-mm-dd |
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\Models; | |
use App\Models\Base as Model; | |
use App\Support\Str; | |
use App\Support\Stringable; | |
use Illuminate\Support\Arr; | |
use Illuminate\Support\Facades\Storage; | |
use Spatie\YamlFrontMatter\YamlFrontMatter; |
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\Console\Commands\Link; | |
use App\Models\Link\Link; | |
use App\Support\Str; | |
use GuzzleHttp\Exception\RequestException; | |
use Illuminate\Console\Command; | |
use Illuminate\Database\Eloquent\Builder; | |
use Illuminate\Http\Client\ConnectionException; |
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\Http\Middleware; | |
use App\Services\ReplayRequest; | |
use Closure; | |
use Illuminate\Http\Request; | |
class PostSpecificReplay | |
{ |
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
<button class="button"> | |
Standard Button | |
</button> | |
<button class="button button--red"> | |
Red Button | |
</button> | |
<button class="button button--inline"> | |
Inline Button |
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
const TextToSVG = require('text-to-svg') | |
const textToSVG = TextToSVG.loadSync('fonts/Inter.woff') | |
const colours = Object.values({ | |
blue: '#2490BA', | |
pink: '#d60058', | |
purple: '#5f01ad', | |
green: '#048242', | |
orange: '#e87204' | |
}).reverse() |
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 | |
// Property::query()->nearest($property)->limit(5)->get(); | |
// $property->nearest()->limit(5)->get(); | |
public function scopeNearest(Builder $query, ?Property $property = null): Builder | |
{ | |
$property = $property ?? $this; | |
$earthRadius = 3959; | |
$latitude = $property->address->lat; |
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
sudo apt install zsh bat | |
zsh --version | |
chsh -s $(which zsh) | |
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
# General | |
alias zshconfig="vi ~/.zshrc" | |
alias ls="ls -la -h -Gp -F --color=auto" | |
alias grep="grep -n --color" |
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/sh | |
# chmod a+x development.sh | |
# General functionality | |
brew install git | |
brew install openssl | |
brew install node | |
brew install npm | |
brew install yarn | |
brew install bat |
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\View\Components\Form; | |
use App\View\Components\Base as Component; | |
use Illuminate\Contracts\View\View as Response; | |
use Money\Money as MoneyObject; | |
use NumberFormatter; | |
class Money extends Component |
NewerOlder