Skip to content

Instantly share code, notes, and snippets.

View kasparasg's full-sized avatar

Kasparas Galdikas kasparasg

View GitHub Profile
import BallClock from './BallClock'
describe('BallClock Test', () => {
let ballClock
beforeEach(() => {
ballClock = new BallClock()
})
it('should throw error when input number of balls is not between 27 and 127', () => {
expect(() => ballClock.init(26)).toThrowError()
@kasparasg
kasparasg / Schedulable.php
Created June 25, 2018 23:42 — forked from davidpiesse/Schedulable.php
Laravel Custom Class/Model Scheduling
<?php
//Don't forget to change the namespace!
namespace App\Traits;
use Cron\CronExpression;
use Illuminate\Support\Carbon;
use Illuminate\Console\Scheduling\ManagesFrequencies;
trait Schedulable{
@kasparasg
kasparasg / modelling.php
Created March 18, 2016 09:10
modelling
<?php
class League extends Model
{
public function teams()
{
return $this->hasMany(Team::class);
}
}