Skip to content

Instantly share code, notes, and snippets.

Matt Wohler MattWohler

Block or report user

Report or block MattWohler

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 savedgame.txt
eyJ2ZXJzaW9uIjoxLjMsImZlYXR1cmVzIjp7ImxvY2F0aW9uIjp7InJvb20iOnRydWUsIm91dHNpZGUiOnRydWUsIndvcmxkIjp0cnVlfX0sInN0b3JlcyI6eyJ3b29kIjoyOTY1LCJmdXIiOjE5NzUsImJhaXQiOjI4NywibWVhdCI6MTYxMCwidGVldGgiOjE2Niwic2NhbGVzIjoxMTYsImNsb3RoIjo1MiwiY3VyZWQgbWVhdCI6MTE3NCwibGVhdGhlciI6NjYyLCJjaGFybSI6MCwidG9yY2giOjEzLCJib25lIHNwZWFyIjo0LCJ3YXRlcnNraW4iOjEsInJ1Y2tzYWNrIjoxLCJsIGFybW91ciI6MSwiY29tcGFzcyI6MX0sImNoYXJhY3RlciI6eyJzdGFydmVkIjoyfSwiaW5jb21lIjp7ImdhdGhlcmVyIjp7ImRlbGF5IjoxMCwic3RvcmVzIjp7Indvb2QiOjR9LCJ0aW1lTGVmdCI6OX0sImJ1aWxkZXIiOnsiZGVsYXkiOjEwLCJzdG9yZXMiOnsid29vZCI6Mn0sInRpbWVMZWZ0IjozfSwiaHVudGVyIjp7ImRlbGF5IjoxMCwic3RvcmVzIjp7ImZ1ciI6MzcuNSwibWVhdCI6MzcuNX0sInRpbWVMZWZ0Ijo0fSwidHJhcHBlciI6eyJkZWxheSI6MTAsInN0b3JlcyI6eyJtZWF0IjowLCJiYWl0IjowfSwidGltZUxlZnQiOjR9LCJjaGFyY3V0aWVyIjp7ImRlbGF5IjoxMCwic3RvcmVzIjp7Im1lYXQiOi01LCJ3b29kIjotNSwiY3VyZWQgbWVhdCI6MX0sInRpbWVMZWZ0IjoxMH0sInRhbm5lciI6eyJkZWxheSI6MTAsInN0b3JlcyI6eyJmdXIiOjAsImxlYXRoZXIiOjB9LCJ0aW1lTGVmdCI6NH19LCJ0aW1lcnMiOnt9LCJnYW1lIjp7ImJ1aWxkZXIiOnsibGV2ZWwi
View FormRequest.php
<?php
namespace HCI\Support\Http;
use Illuminate\Foundation\Http\FormRequest as BaseFormRequest;
abstract class FormRequest extends BaseFormRequest
{
/**
* Determine if the user is authorized to make this request.
View gist:a60d03367d7cc61f4f80023d5043f67f

Taylor Otwell : Yeah, so at first, I had no intentions of splitting off and writing a framework. But you're right, one of the first projects I wrote was CI injector, CInject or something like that. I was actually pretty proud of that. It was actually the first reflection-based IOC container in PHP at all that I'm aware of. There was one other IOC container that was also written in 2010, a few months later. That was one of the main pieces of .NET/.MVC that I really like was the auto-resolving container. Laravel's container still works, basically, like that first CodeIgniter container did. The other thing I was really interested in was the better ORM for CodeIgniter, and I wanted to get those two things in ... oh, there was a third thing.

I wanted better templating, like Blade, where you have an @extends at the top, and then you define these sections that override the parent template section, stuff like that. Template inheritance. I remember the final straw, that I couldn't really continue with CodeIgniter any

@MattWohler
MattWohler / stickstyles.css
Created Jun 7, 2017
Sticky Footer Styles
View stickstyles.css
/* Sticky footer styles
-------------------------------------------------- */
html {
position: relative;
min-height: 100%;
}
body {
/* Margin bottom by footer height */
margin-bottom: 60px;
}
@MattWohler
MattWohler / setting-up-ssh-keys.md
Last active Mar 10, 2016
How To Set Up SSH Keys
View setting-up-ssh-keys.md

How To Set Up SSH Keys

Step One—Create the RSA Key Pair

Create the key pair on the client machine:

ssh-keygen -t rsa

Step Two—Copy the Public Key

Once the key pair is generated, place the public key on the virtual server:

@MattWohler
MattWohler / TokenGuard.md
Last active Jan 31, 2016
Laravel 5.2: Authentication Guard API Token
View TokenGuard.md

Laravel 5.2: Authentication Guard API Token

Recently, Jacob Bennett beat me to the punch when after much digging, came to the realization that I needed to utilize Laravel's Token Guard, yet there were no resources to be found on implementing such feature as the Laravel Documentation leaves much to be desired.

I highly recommend you take a look at Jacob's API Token Authentication in Laravel 5.2 article, as it provides great insight onto the subject, as well as an active discussion in the comment section.

However, there is a variation on the popular suggestion, as in the case of my implementation.

For the setup, I wanted a custom HTTP Header with key to be sent on every request for authentication.

View gist:73010a638f62a267f67e
[core]
autocrlf = true
excludesfile = C:\\Users\\m_wohler\\Documents\\gitignore_global.txt
[user]
name = Matt Wohler
email = matt.wohler@mventures.ca
[alias]
pu = pull
pr = pull --rebase
rb = rebase
@MattWohler
MattWohler / aliases
Last active Aug 8, 2016
bash aliases
View aliases
# Easier navigation: .., ..., ...., ....., ~ and -
alias ..="cd .."
alias ...="cd ../.."
# Shortcuts
alias dl="cd ~/Downloads"
alias dt="cd ~/Desktop"
alias h="history"
# Detect which `ls` flavor is in use
You can’t perform that action at this time.