Skip to content

Instantly share code, notes, and snippets.

View RSpeekenbrink's full-sized avatar

Remco Speekenbrink RSpeekenbrink

View GitHub Profile
@RSpeekenbrink
RSpeekenbrink / FooterToPageBottom.js
Last active February 5, 2019 14:00
Fix the footer to the bottom of the page if the lack of content on the page causes white space under the footer.
/**
* Set the footer (<footer>) location to the bottom of the screen depending on screen size and content on the page.
*/
window.addEventListener('load', FooterToPageBottom); window.addEventListener('resize', FooterToPageBottom);
function FooterToPageBottom() {
var footer = document.getElementsByTagName("footer"); //get <footer> elements here (Get elementById to make it slightly faster ;) )
if(footer.length < 1) return; //does a <footer> element exist?
footer = footer[0]; //grab first footer element to work with :D
@RSpeekenbrink
RSpeekenbrink / 2018_07_31_144159_create_countries_table.php
Created July 31, 2018 13:26
Laravel Migration: Countries table, a table with all countries (id, iso, name, nicename, iso3, numcode, phonecode)
<?php
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCountriesTable extends Migration
{
/**
@RSpeekenbrink
RSpeekenbrink / countriesInDutch.js
Last active April 12, 2019 15:28
Array of Country names in Dutch
var countries = [
'Afghanistan',
'Albanië',
'Algerije',
'Andorra',
'Angola',
'Antigua-Barbuda',
'Argentinië',
'Armenië',
'Aruba',
@RSpeekenbrink
RSpeekenbrink / .bashrc
Created May 10, 2019 13:28
.bashrc Welcome Message with cowsay and fortune, shuffled
# Welcome Message
fortune | cowsay -f $(ls /usr/share/cowsay/cows/ | shuf -n1)
@RSpeekenbrink
RSpeekenbrink / fixNpmPermissions.sh
Created May 15, 2019 07:44
Ubuntu Fix NPM permissions
sudo chown -R $USER:$(id -gn $USER) ~/.npm
sudo chown -R $USER:$(id -gn $USER) /usr/local/lib/node_modules
@RSpeekenbrink
RSpeekenbrink / gist:a9823b6e9de85fa0f19d13517999cfb9
Created July 22, 2020 17:41
Homestead v11.0.0 mariadb error output
Bringing machine 'vagrantbox' up with 'virtualbox' provider...
==> vagrantbox: Importing base box 'laravel/homestead'...
==> vagrantbox: Matching MAC address for NAT networking...
==> vagrantbox: Checking if box 'laravel/homestead' version '10.0.0' is up to date...
==> vagrantbox: Setting the name of the VM: vagrantbox
==> vagrantbox: Clearing any previously set network interfaces...
==> vagrantbox: Preparing network interfaces based on configuration...
vagrantbox: Adapter 1: nat
vagrantbox: Adapter 2: hostonly
==> vagrantbox: Forwarding ports...
@RSpeekenbrink
RSpeekenbrink / gist:dfc11e2a01e4d4d1ac8ae1fefda149ad
Created July 23, 2020 08:48
Homestead no database MariaDB output
$ vagrant up
Bringing machine 'vagrantbox' up with 'virtualbox' provider...
==> vagrantbox: Importing base box 'laravel/homestead'...
==> vagrantbox: Matching MAC address for NAT networking...
==> vagrantbox: Checking if box 'laravel/homestead' version '10.0.0' is up to date...
==> vagrantbox: Setting the name of the VM: vagrantbox
==> vagrantbox: Clearing any previously set network interfaces...
==> vagrantbox: Preparing network interfaces based on configuration...
vagrantbox: Adapter 1: nat
vagrantbox: Adapter 2: hostonly