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 CustomCast; | |
use Carbon\Carbon; | |
use Illuminate\Contracts\Database\Eloquent\CastsAttributes; | |
class UtcDateTime implements CastsAttributes | |
{ | |
/** |
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
"require": { | |
// Exact version to 1.5.4 | |
"vendor/package": "1.5.4", | |
// Greater or lower bounds | |
"vendor/package": ">=1.5.0", // Anything above 1.5.0 | |
"vendor/package": "<1.5.0", // Anything below 1.5.0 | |
// Wildcard | |
"vendor/package": "1.5.*", // >=1.5 <1.6 |
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
version: '3.3' | |
services: | |
db: | |
image: mysql:5.7 | |
volumes: | |
- db_data:/var/lib/mysql | |
environment: | |
MYSQL_ROOT_PASSWORD: somewordpress | |
MYSQL_DATABASE: wordpress |
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 groupBy = function (data, key) { | |
return data.reduce(function (carry, el) { | |
var group = el[key]; | |
if (group === null) { | |
group = 'General' | |
} | |
if (carry[group] === undefined) { | |
carry[group] = [] | |
} |
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
find . -name "node_modules" -exec rm -rf '{}' + |
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\Providers; | |
use Illuminate\Support\ServiceProvider; | |
use Illuminate\Translation\Translator; | |
use App\Translator\JsonTranslator; | |
class AppServiceProvider extends ServiceProvider | |
{ |
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 | |
git diff --cached --name-only | while read FILE; do | |
if [[ "$FILE" =~ ^.+(php|inc|module|install|test)$ ]]; then | |
echo "Running tests..." | |
cd "${0%/*}/.." | |
phpunit 1> /dev/null | |
if [ $? -ne 0 ]; then | |
echo -e "\e[1;31m\tUnit tests failed ! Aborting commit.\e[0m" >&2 | |
exit 1; |
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
copyText (textToCopy) { | |
this.copied = false | |
// Create textarea element | |
const textarea = document.createElement('textarea') | |
// Set the value of the text | |
textarea.value = textToCopy | |
// Make sure we cant change the text of the textarea |
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
public function boot() | |
{ | |
Queue::failing(function (JobFailed $event) use ($slackUrl) { | |
Notification::route('slack', $slackUrl)->notify(new SlackFailedJob($event)); | |
}); | |
} |
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
alias exd="sh enabled-xdebug.sh" | |
alias dxd="sh disable-xdebug.sh" |
NewerOlder