Skip to content

Instantly share code, notes, and snippets.

Avatar
🇧🇪
Never stop learning!

Ivan Vermeyen ivanvermeyen

🇧🇪
Never stop learning!
View GitHub Profile
View How To Hide The Select Arrow On Firefox.md

How to remove hide the <select> arrow in Firefox using -moz-appearance:none;

tl;dr (or, the fix)

  1. Set -moz-appearance to none. This will "reset" the styling of the element;
  2. Set text-indent to 0.01px. This will "push" the text a tiny bit[1] to the right;
  3. Set text-overflow to '' (an empty string). This will change anything that extends beyond the element's width to... nothing - and this includes the infamous arrow!

Firefox select element with no arrow

@ivanvermeyen
ivanvermeyen / UUID.php
Last active Aug 29, 2015
Generate a Unique ID
View UUID.php
<?php
class UUID {
/**
* @var
*/
public $prefix;
/**
@ivanvermeyen
ivanvermeyen / .htaccess
Created Jul 25, 2015
Enable file uploads
View .htaccess
<IfModule mod_suphp.c>
suphp_configpath /path/to/custom/php.ini
</IfModule>
@ivanvermeyen
ivanvermeyen / EnsureQueueListenerIsRunning.php
Last active Nov 19, 2021
Ensure that the Laravel queue listener is running with "php artisan queue:checkup" and restart it if necessary. You can run this automatically with a cron job: http://laravel.com/docs/scheduling
View EnsureQueueListenerIsRunning.php
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class EnsureQueueListenerIsRunning extends Command
{
/**
* The name and signature of the console command.
@ivanvermeyen
ivanvermeyen / tenant-middleware
Created Jan 17, 2016 — forked from taylorotwell/tenant-middleware
Magical tenant middleware thing
View tenant-middleware
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Auth\Access\AuthorizationException;
class VerifyTenants
{
/**
@ivanvermeyen
ivanvermeyen / Kernel.php
Created Jan 18, 2016
Find any running "queue:listen" processes for a Laravel project and kill those. Fire "php artisan queue:stop" in your "current" project root. Intended to use with a deploy script when you are using non-daemon listeners and deploy releases. If you are using daemons, run "queue:restart" instead. You can use a process monitoring tool like Superviso…
View Kernel.php
<?php
namespace App\Console;
use App\Console\Commands\StopQueueListeners;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
@ivanvermeyen
ivanvermeyen / BlogController.php
Created Mar 27, 2016 — forked from tobysteward/BlogController.php
Laravel AJAX Pagination with JQuery
View BlogController.php
<?php
class BlogController extends Controller
{
/**
* Posts
*
* @return void
*/
public function showPosts()
View ValidateSometimes.php
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class SomeRequest extends FormRequest
{
/**
* Validate conditional rules.
*
@ivanvermeyen
ivanvermeyen / !NOTE.md
Last active Nov 30, 2021
Setup a Laravel Storage driver with Google Drive API
View !NOTE.md
View SecureToken.php
<?php
/**
* Generate a secure token.
*
* @url http://stackoverflow.com/questions/18910814/best-practice-to-generate-random-token-for-forgot-password
*/
function generateToken($length = 40)
{
return bin2hex(random_bytes($length));