Instantly share code, notes, and snippets.

View routes.php
// Enforce HTTPS
$app->add(function (Request $request, Response $response, $next) {
$cf = $this->get('settings');
// Check if configuration wants us to enforce https, so we can turn it
// on or off depending on whether the server supports https
if (isset($cf['force_https']) && $cf['force_https'] === true) {
if ($request->getUri()->getScheme() !== 'https') {
// Redirect to HTTPS
View SystemLoader.php
<?php
/**
* SystemLoader
*
* Autoloader for project libs and dependencies.
*
* @author Mark LaDoux <mark.ladoux@gmail.com>
*/
class SystemLoader
{
View keybase.md

Keybase proof

I hereby claim:

  • I am mladoux on github.
  • I am mladoux (https://keybase.io/mladoux) on keybase.
  • I have a public key ASAQbMlDtPPSVJ75uR84kO_lq87mt5zif76Zw6nW3sP_1wo

To claim this, I am signing this object:

View GPG Public Key
### Keybase proof
I hereby claim:
* I am mladoux on github.
* I am mladoux (https://keybase.io/mladoux) on keybase.
* I have a public key ASAQbMlDtPPSVJ75uR84kO_lq87mt5zif76Zw6nW3sP_1wo
To claim this, I am signing this object:
View GPG Public Key
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFm0TXsBEACUVILSA5HcE/bzTgyU3jgc4qLejlShchHLl306QrPT1V5UD7yr
Sn2Q42kov4lal3i0+UI7AFj301d3xVd6J6qecqIeCnEmcidzcK19tmtZw1bhyDbl
ssIaRA3epkOcyhKj9C9QGnH6W1QSi8i8rLscC82Y91wj7lBSn1gPgzVFbzlTRbfJ
pF7eaoN9iJCp7r5I+hGjWqXJ7jbHfaN+Vowl6jxc5TTIhFCuRJn86SQc+G8bvq0j
R2/66nJan5AUWCCQDQrxVWyVMLoJrSsflKCYbrIa8/GQHDuP4nmC049TnpbHaW7+
BofIKX8scxwDKMdvtOo6Gw0leCDu+a0l4NGk/uIKMynOdoRHgeFtt3WSM02PCL1x
LpE5ptDzVi6Ytkly8oyKoccqh+slgninY2AAXGixOATamqI6jpumqhv8FjiKeLHw
VOpkBK0cnwuFZRBNvEiNM9BcJ12LAX4GwctMuc9FKxAwQdyAESkM7GhZXdG/IuHj
View 50-synaptics.conf
Section "InputClass"
Identifier "touchpad"
Driver "synaptics"
MatchIsTouchpad "on"
Option "TapButton1" "1"
Option "TapButton2" "3"
Option "TapButton3" "2"
Option "VertEdgeScroll" "off"
Option "VertTwoFingerScroll" "on"
Option "HorizEdgeScroll" "off"
View printnl.py
def printnl(lines=1):
'''Print a variable number of empty lines to the screen
Keyword arguments:
lines -- Number of empty lines to print.
Defaults to 1.
Returns: string
View OpenWithSublimeText3.bat
@echo off
SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f