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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
// Assign this to models and implement these methods | |
interface ShouldBeValidated | |
{ | |
/** | |
* Returns an array of key => value rules (as per normal Laravel validation) | |
* | |
* @return array |
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 | |
folder=$1 | |
if [ -z $1 ] | |
then | |
echo 'Please provide the root destination of the export:' | |
read folder | |
fi | |
git fetch --all |
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
cat *.sql | mysql |
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
swwwwwwwwwwwwwwwwwwwwwwwt |
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 GR\Clan; | |
use Illuminate\Database\Eloquent\Model; | |
use GR\Section\SectionInterface; | |
use GR\Member\MemberInterface; | |
use GR\Lib\ModelCache; | |
use GR\Member\Member; | |
class Clan extends Model implements ClanInterface | |
{ |
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 Request; | |
use View; | |
use App; | |
abstract class ApplicationsServiceProvider extends ServiceProvider | |
{ | |
public function register() |
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 | |
class Member extends Model implements CurrentMember | |
{ | |
use ModelCache; | |
public function getLeaguePlayer(SectionInterface $section) | |
{ | |
return $this->cache(function(SectionInterface $section) { | |
return $this->leaguePlayers() | |
->where('section_id', $section->getID()) |
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 | |
use ... // folded for brevity | |
return [ | |
'league.enable' => [ | |
'rules' => [ | |
AtLeastAdmin::class, | |
HasJurisdiction::class, | |
LeagueIsNotEnabled::class |
OlderNewer