Skip to content

Instantly share code, notes, and snippets.

Corey Ballou cballou

Block or report user

Report or block cballou

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 blockstack-verification
Verifying my Blockstack ID is secured with the address 1fo4sVGAUxsB22mMK1xFAFQCdb7YUcSvh

Keybase proof

I hereby claim:

  • I am cballou on github.
  • I am coreyballou ( on keybase.
  • I have a public key ASBMvS6f_1MLwT-AgL2aCt9z2y7BS-TyRw6z9AHwOvd24Ao

To claim this, I am signing this object:

Verifying that "" is my Blockstack ID.
cballou / laravel-global-exception-handler.php
Last active Jan 18, 2019
Global handling of Laravel exceptions to better support AJAX requests.
View laravel-global-exception-handler.php
<?php namespace App\Exceptions;
use Log;
use Mail;
use Config;
use Exception;
use Illuminate\Auth\Access\UnauthorizedException;
use Illuminate\Session\TokenMismatchException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
cballou / mcrypt-pad-aes.php
Created Jun 5, 2017
Mcrypt helper function for padding AES encryption keys to ensure PHP 5.6-7.1 is backwards compatible with PHP <= 5.5.
View mcrypt-pad-aes.php
* Pad an AES encrypted key to ensure it's of valid size according
* to specification. This function is backwards compatible with
* PHP <= 5.5 and is intended for usage with PHP 5.6+.
function pad_aes($str) {
$c = strlen($str);
$validLengths = array(16, 24, 32);
foreach ($validLengths as $l) {
cballou / example-config.php
Created Mar 9, 2017
Watchdog is a PHP library using inotify to watch for file changes.
View example-config.php
return array(
'types' => array('sass', 'scss', 'less', 'styl', 'jade', 'haml'),
'watch' => array(
'minify' => true,
'ignore' => array()
cballou / config-template-example.php
Last active Mar 9, 2017
Example of using Winston, a PHP AB/split testing library which utilizes machine learning and Redis.
View config-template-example.php
$config = array(
'tests' => array(
'signup-submit-button-test' => array(
'description' => 'A sample test',
'variations' => array(
'id' => 'submit-default',
'text' => '<button type="submit" {{click}}>Submit</button>'
cballou / client-usage.php
Last active Mar 8, 2017
Documentation regarding GoogleAuthenticatorRedux. Official documentation of the library can be found at
View client-usage.php
// if you are using composer, which is the preferred method of autoloading
// create a new secret for a user wishing to enable 2FA
// you will need to store this securely
$secret = $ga->createSecret();
// example of generating a QR code to display to the end user
View mongosession-advanced-usage.php
// the config array for loading MongoDB servers
$config = array(
// cookie related vars
'cookie_path' => '/',
'cookie_domain' => '', //
// session related vars
cballou / jQuery-Double-Rainbow-Plugin-default-configuration-options.js
Created May 18, 2016
An example of using the jQuery Double Rainbow plugin.
View jQuery-Double-Rainbow-Plugin-default-configuration-options.js
$.fn.doubleRainbow.defaults = {
startDistance: 500,
steps: 20,
startBgColor: '#333333',
endBgColor: '#999999',
startColor: '#CCCCCC',
endColor: '#FFFFFF'
You can’t perform that action at this time.