Skip to content

Instantly share code, notes, and snippets.

View mladoux's full-sized avatar

Mark LaDoux mladoux

View GitHub Profile
@mladoux
mladoux / OpenWithSublimeText3.bat
Last active January 3, 2016 04:19 — forked from mrchief/LICENSE.md
Adds "Open with Sublime Text 3" explorer context item for both directories and files, rather than for files only as is default.
@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
@mladoux
mladoux / printnl.py
Last active November 7, 2017 06:18
Print multiple newlines
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
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"
### 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:

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:

@mladoux
mladoux / SystemLoader.php
Created August 26, 2018 21:06
SystemLoader - A very simplle PHP class autoloader. Does not work with underscored class path conventions, but could easilly be modified to do so.
<?php
/**
* SystemLoader
*
* Autoloader for project libs and dependencies.
*
* @author Mark LaDoux <[email protected]>
*/
class SystemLoader
{
@mladoux
mladoux / routes.php
Last active November 23, 2018 17:40 — forked from geggleto/index.php
Slim 3 Middleware - Force HTTPS
// 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
@mladoux
mladoux / URI.php
Created December 25, 2018 20:13
URI Parser for DoomHamster Media Group ( Remove namespace from top of script if not using namespaces )
<?php namespace DHMedia\Input;
/**
* DHMedia URI Parser
*
* @author Mark LaDoux <[email protected]>
* @copyright Copyright © 2018, DoomHamster Media
* @license MIT <https://opensource.org/licenses/MIT>
*/
class URI
@mladoux
mladoux / github-gist-code-box.css
Last active February 3, 2022 12:02
Resize embedded gist code box and centers it. Adjust to taste.
/* Set width to 600px, and center box */
.gist {
margin-left: auto;
margin-right: auto;
width: 600px !important;
}
/* Limit height and width of script box, and enable scrollbars */
.gist-data {
height:250px;
@mladoux
mladoux / github-gist-monokai.css
Last active November 27, 2023 12:11
Monokai color scheme for gists ( with matching powered by github bar )
/* Monokai color Scheme Syntax Highlight Overrides ( REQUIRES 'body' TAGS TO WORK) */
body .gist .highlight {
background: #272822;
}
body .gist .blob-num,
body .gist .blob-code-inner,
body .gist .pl-s2,
body .gist .pl-stj {
color: #f8f8f2;
}