I hereby claim:
- I am anaxamaxan on github.
- I am anaxamaxan (https://keybase.io/anaxamaxan) on keybase.
- I have a public key ASCb9EpQic9VzYhJ-snAj_hVAMdTMo3383nUsi6Cmm5ngQo
To claim this, I am signing this object:
// app/Providers/MacroServiceProvider | |
public function boot(): void | |
{ | |
Collection::macro('paginate', $this->paginate()); | |
} | |
private function paginate(): \Closure | |
{ | |
/** |
<?php | |
function routeNameFromUrl(string $url, string $method = 'GET'): ?string | |
{ | |
$method = strtoupper($method); | |
$request = app('request') | |
->create(trim($url), $method); | |
return app('router') |
<?php | |
use Carbon\Carbon; | |
Carbon::now()->addDays(365)->diffInDays(Carbon::now()); | |
// 364 | |
Carbon::now()->addDays(365)->diffInDays(Carbon::now()->subSecond()); | |
// 365 |
<?php | |
namespace App\Models; | |
use App\Models\Traits\WithWhereHas; | |
use Illuminate\Database\Eloquent\Builder; | |
use Illuminate\Database\Eloquent\Model as BaseEloquentModel; | |
abstract class Model extends BaseEloquentModel | |
{ |
vagrant : INFO global: Vagrant version: 2.1.2 | |
At line:1 char:1 | |
+ vagrant up --debug 2>&1 | Tee-Object -FilePath ".\vagrant.log" | |
+ ~~~~~~~~~~~~~~~~~~~~~~~ | |
+ CategoryInfo : NotSpecified: ( INFO global: Vagrant version: 2.1.2:String) [], RemoteException | |
+ FullyQualifiedErrorId : NativeCommandError | |
INFO global: Ruby version: 2.4.4 | |
INFO global: RubyGems version: 2.6.14.1 |
#!/bin/bash | |
# This way you can customize which branches should be skipped when | |
# prepending commit message. | |
if [ -z "$BRANCHES_TO_SKIP" ]; then | |
BRANCHES_TO_SKIP=(master production dev test) | |
fi | |
BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
BRANCH_NAME="${BRANCH_NAME##*/}" |
# Add this to your ~/.bash_profile (or .bash_aliases if you have one) | |
alias showHidden="defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app" | |
alias hideHidden="defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app" | |
<?php | |
use Illuminate\Foundation\Testing\DatabaseTransactions; | |
use Sa\Http\Controllers\Traits\UsesAccessToken; | |
use Sa\Models\SupervisionSite; | |
use Sa\Models\User; | |
use Sa\Services\AccessToken\AccessToken; | |
class UsesAccessTokenTest extends TestCase // TestCase extends PHPUnit_Framework_TestCase | |
{ |
I hereby claim:
To claim this, I am signing this object:
Here is how I got Nightwatch running on my local machine.
Installed Java 8 JDK. JDK != JRE. I run Mac OS El Capitan. If you type java in the terminal and you get an error like No Java runtime present, requesting install.
then you need the JDK. Go to java.com Downloads section and browse to find the latest version of Java SE Development Kit for your system. As of this writing it's version 8.
Install Node and Nightwatch globally. If you don't already have Node, install/Update it via download at https://nodejs.org/. Install nightwatch, preferably globally:
$ sudo npm install -g nightwatch