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
| #!/usr/bin/env bash | |
| # Build apfs-fuse on Ubuntu and mount a Mac APFS container read-only. | |
| # Requires internet access to download packages and source code. | |
| # Usage: bash mount-mac-apfs.sh | |
| # Optional APFS volume index: bash mount-mac-apfs.sh 1 | |
| # The default volume index is 0. A separate Data volume may hold user files. | |
| # Source and limitations: https://github.com/sgan81/apfs-fuse | |
| # This driver is read-only and experimental; some compression is unsupported. | |
| # Enter FileVault passwords only at the driver's terminal prompt, never here | |
| # or in a public Gist. Copy recovered files onto a separate external drive. |
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 | |
| return [ | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Validation Language Lines | |
| |-------------------------------------------------------------------------- | |
| | | |
| | The following language lines contain the default error messages used by |
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 | |
| use Illuminate\Support\Str; | |
| use Illuminate\Validation\Validator; | |
| use Illuminate\Validation\ValidationException; | |
| use Illuminate\Support\Facades\Validator as ValidatorFactory; | |
| /** | |
| * Class CoreCTO | |
| */ |
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
| #!/bin/bash | |
| laravel new $1 | |
| # Change Dir | |
| cd $1 | |
| # Update .env | |
| sed -i "s/APP_NAME=Laravel/APP_NAME=$1/g" .env | |
| sed -i "s/DB_DATABASE=laravel/DB_DATABASE=$1/g" .env |
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
| $currentMinute = Carbon::parse($userStartTime)->startOfMinute(); | |
| $diff = (int) $this->roundUpToAny($currentMinute->minute, 5) - $currentMinute->minute; // 50 | |
| $additionalMinutes = (integer) $this->roundUpToAny(mt_rand(120, 360), 5); | |
| $start_time = $currentMinute->addMinutes($diff + $additionalMinutes); | |
| dd($start_time); |
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
| # add Sublime Text 3 stable to your sources | |
| wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - | |
| echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list | |
| #update sources | |
| sudo apt update -y && sudo apt dist-upgrade -y | |
| #install | |
| sudo apt install sublime-text | |
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
| # | |
| # REQUIRES: | |
| # - server (the forge server instance) | |
| # - event (the forge event instance) | |
| # - sudo_password (random password for sudo) | |
| # - db_password (random password for database user) | |
| # - callback (the callback URL) | |
| # - recipe_id (recipe id to run at the end) | |
| # |
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
| #!/bin/bash | |
| # Post install script for Ubuntu 16.04LTS and Mint 18LTS | |
| # add the PHP PPA https://deb.sury.org/ | |
| sudo add-apt-repository -y ppa:ondrej/php | |
| # I believe even releases are LTS, so when 8 comes out should update | |
| curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - | |
| # add Sublime Text 3 stable to your sources |
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 Tattoodo\Helpers; | |
| use Carbon\Carbon; | |
| /** | |
| * Creates a repeatable randomizer/shuffle of an array based on a given seed. | |
| */ | |
| class Randomizer |
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
| public function getModelRepresentation() | |
| { | |
| switch ($this) { | |
| case instance of Mention: | |
| if ($this->mentionable instanceof Comment) { | |
| return $this->mentionable->commentable; | |
| } | |
| return $this->mentionable; | |
| break; | |
| case instance of Comment: |
NewerOlder