Skip to content

Instantly share code, notes, and snippets.

@GMory
GMory / install-docker.sh
Created January 30, 2019 15:37
Install docker and docker-compose on a fresh Ubuntu 16.04/16.10/18.04/18.10 box
#!/bin/bash
echo "Installing docker..."
sudo apt update
sudo apt -y install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
apt-cache policy docker-ce
@GMory
GMory / ResetPasswordController.php
Last active July 20, 2018 13:29
Laravel 5.6 ResetPasswordController.php (Fix for $email and compatible with SPA - Vue.js, React, Angular)
...
/*
* Requires Php-Vars-To-JS-Transformer by Jeffery Way
* https://github.com/laracasts/PHP-Vars-To-Js-Transformer
*
* Import both Javascript (from the aforementioned package), DB, and Hash
*
* We use the token included in the URL to extract the email from the database.
* That way we can continue to use the default PW reset methods.

Keybase proof

I hereby claim:

  • I am gmory on github.
  • I am gmory (https://keybase.io/gmory) on keybase.
  • I have a public key ASCoYnuny-FsBlVPvipj37WGPUkyFfVC9deWapAkhkn7lAo

To claim this, I am signing this object:

# Track only transactions whose scopes involve the listed accounts. Default is to track all transactions.
# filter_on_accounts =
# Limits the maximum time (in milliseconds) processing a single get_transactions call.
get-transactions-time-limit = 3
# File to read Genesis State from
genesis-json = /home/ubuntu/genesis.json
# override the initial timestamp in the Genesis State file
@GMory
GMory / RegisterRequest.php
Last active June 29, 2017 17:34
Laravel Spark: Allow invited users to register without requirement for plan
// app/Http/Requests/RegisterRequest.php
// Create this new request that registrations will go through
<?php
namespace App\Http\Requests;
use Laravel\Spark\Spark;
use App\Http\Requests\Request;
use Laravel\Spark\Contracts\Interactions\Auth\CreateUser;
use Laravel\Spark\Http\Requests\Auth\StripeRegisterRequest;