Skip to content

Instantly share code, notes, and snippets.


Simon Depelchin depsimon

View GitHub Profile
depsimon / UserFactory.php
Created Jul 18, 2019
Unique initials from first name & last name in Laravel Model Factory
View UserFactory.php
/** @var \Illuminate\Database\Eloquent\Factory $factory */
use App\User;
use Illuminate\Support\Str;
use Faker\Generator as Faker;
| Model Factories
depsimon / profile.vue
Created Mar 5, 2019
Vuetify Profile Page
View profile.vue
<v-container fluid>
<v-layout column>
<v-flex class="mb-4">
<v-avatar size="96" class="mr-4">
<img :src="'/avatars/avatar_' + (form.avatar.toLowerCase()) + '.png'" alt="Avatar">
<v-btn @click="openAvatarPicker">Change Avatar</v-btn>
depsimon / AvatarPicker.vue
Created Mar 5, 2019
Avatar Picker with Vuetify in a Profile Form
View AvatarPicker.vue
<v-dialog :fullscreen="$vuetify.breakpoint.xs" width="500" transition="dialog-bottom-transition" v-model="show">
<v-toolbar dark color="primary">
<v-btn icon dark @click="show = false">
<v-toolbar-title>Select an Avatar</v-toolbar-title>
depsimon / RouteSummaryCommand.php
Created Jul 13, 2018
route:summary Summary of all registered routes
View RouteSummaryCommand.php
namespace App\Console;
use Illuminate\Foundation\Console\RouteListCommand;
use Illuminate\Routing\Route;
use Symfony\Component\Console\Input\InputOption;
class RouteSummaryCommand extends RouteListCommand
depsimon / Icon.vue
Last active Apr 15, 2018
Font Awesome 5 - SVG Icon component
View Icon.vue
<svg class="icon" viewBox="0 0 512 512"><use :xlink:href="'/svg/fa-' + w + '.svg#' + n"></use></svg>
export default {
props: {
weight: { default: 'regular' },
name: { type: String }
View genesis_public_key
depsimon / helpers.php
Created Jan 27, 2018
Count mondays of a month with Carbon in PHP/Laravel
View helpers.php
function mondaysInMonth($month = null) {
if ($month === null) $month = Carbon\Carbon::today()->startOfMonth();
$nextMonth = $month->copy()->endOfMonth();
return $month->diffInDaysFiltered(function ($date) {
return $date->isMonday();
}, $nextMonth);
depsimon / bulma.blade.php
Created Jul 16, 2017
Laravel Bulma Pagination Template
View bulma.blade.php
@if ($paginator->hasPages())
<nav class="pagination">
{{-- Previous Page Link --}}
@if ($paginator->onFirstPage())
<a class="pagination-previous" disabled>Previous</li>
<a class="pagination-previous" href="{{ $paginator->previousPageUrl() }}" rel="prev">Previous</a>
{{-- Next Page Link --}}
depsimon / helper.php
Created Dec 9, 2014
PHPExcel - CSV to array helper function
View helper.php
* Helper function to convert CSV sheet to key value array
* PHPExcel.php class required
* @param string $filePath path to CSV file
* @param string $delimiter delimiter
* @param string $enclosure enclosure
* @param string $lineEnding line ending
* @param integer $sheetIndex sheet index to read
depsimon /
Created Jun 2, 2014 — forked from jookyboi/
CSS libraries and guides to bring some order to the chaos.


  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.