Skip to content

Instantly share code, notes, and snippets.

Stan Daniëls standaniels

Block or report user

Report or block standaniels

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View error.txt
PHP Warning: Uncaught ErrorException: require(/home/vagrant/pap/site/database/factories/CategoryFactory.php): failed to open stream: Too many open files in /home/vagrant/pap/site/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php:275
Stack trace:
#0 /home/vagrant/pap/site/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php(275): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'require(/home/v...', '/home/vagrant/p...', 275, Array)
#1 /home/vagrant/pap/site/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php(275): require()
#2 /home/vagrant/pap/site/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php(68): Illuminate\Database\Eloquent\Factory->load('/home/vagrant/p...')
#3 /home/vagrant/pap/site/vendor/laravel/framework/src/Illuminate/Database/DatabaseServiceProvider.php(83): Illuminate\Database\Eloquent\Factory::construct(Object(Faker\Generator), '/home/vagrant/p...')
#4 /home/vagrant/pap/site/vendor/laravel/framework/sr
View DatabaseSeeder.php
<?php
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
@standaniels
standaniels / after.sh
Last active Oct 11, 2018
Create supervisor program for Laravel queue worker in Homestead
View after.sh
#!/bin/sh
# This script creates a supervisor program for the Laravel queue worker and writes
# the log to the storage folder of the project. It also starts the http server on
# port 9001 so you need to add this port forwarding to your Homestead.yaml file.
sudo sh -c 'echo "[inet_http_server]
port = 9001
username = homestead
password = secret
View .screenrc
startup_message off
defutf8 on
#caption always "%{= Wk}%-w%{= Bw}%n %t%{-}%+w %-=%c:%s"
#vbell on
autodetach on
hardstatus alwayslastline "%{.kc}%-w%{.kw}%n*%t%{-}%+w %= %c:%s %d/%m/%Y"
@standaniels
standaniels / dist.js
Created Jan 24, 2018
Show only my issues in milestone
View dist.js
(()=>{function e(){Array.from(document.querySelectorAll("[id^=issue_")).forEach(e=>{0===Array.from(e.querySelectorAll("img.from-avatar")).filter(e=>e.alt==="@"+document.querySelector('meta[name="user-login"]').getAttribute("content")).length&&(e.style.display="none")})}new MutationObserver(e).observe(document.querySelector(".issues-listing"),{subtree:!0,childList:!0}),e()})();
@standaniels
standaniels / whitespace.styl
Last active Oct 13, 2017
Whitespace helpers
View whitespace.styl
$gutter-width = 20
$break-sm = 768
$break-md = 992
$break-lg = 1200
$breakpoints = { 'xs': 0 px, 'sm': $break-sm px, 'md': $break-md px, 'lg': $break-lg px }
for bp in $breakpoints
for i in (0...10)
$distance = i * $gutter-width px
@media (min-width $breakpoints[bp])
View whitespace.scss
$breakpoints: xs, sm, md, lg;
@each $breakpoint in $breakpoints {
@for $i from 0 through 10 {
$distance: $i * 15;
$breakpointInPixels: 0;
@if $breakpoint == sm {
$breakpointInPixels: 768;
} @else if $breakpoint == md {
$breakpointInPixels: 992;
@standaniels
standaniels / _switch.scss
Last active Jun 22, 2017
Bootstrap switch checkbox
View _switch.scss
// Demo: https://jsfiddle.net/fjspx80x/2/
.switch > input[type="checkbox"] {
display: none;
}
.switch > label.toggle {
cursor: pointer;
height: 0;
position: relative;
@standaniels
standaniels / ide-helper.php
Last active Jun 21, 2017
Laravel IDE Helper config for Bootform's magic methods
View ide-helper.php
<?php
return array(
'magic' => array(
'BootForm' => array(
'setToken' => 'AdamWathan\Form\FormBuilder::setToken',
'open' => 'AdamWathan\Form\FormBuilder::open',
'close' => 'AdamWathan\Form\FormBuilder::close',
'text' => 'AdamWathan\BootForms\BasicFormBuilder::text',
'date' => 'AdamWathan\BootForms\BasicFormBuilder::date',
'dateTimeLocal' => 'AdamWathan\BootForms\BasicFormBuilder::dateTimeLocal',
You can’t perform that action at this time.