Skip to content

Instantly share code, notes, and snippets.

Paul Conroy conroyp

Block or report user

Report or block conroyp

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
@conroyp
conroyp / func_get_args_with_defaults.php
Created Jan 6, 2020
func_get_args extended to include default parameters
View func_get_args_with_defaults.php
if (!function_exists('func_get_args_with_defaults')) {
/**
* Get all function arguments, including defaults.
* An issue with func_get_args is that it doesn't include default
* values. This leads to cases where we'd expect cache re-use, but are
* seeing cache misses, e.g:
* $foo->getStuff('category');
* $foo->getStuff('category', 1, 100);
*
* function getStuff($type, $page = 1, $limit = 100)
View keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@conroyp
conroyp / Vagrantfile Mailcatcher install
Created Aug 30, 2014
Vagrantfile update to install mailcatcher
View Vagrantfile Mailcatcher install
config.vm.provision "shell", path: "relative/path/to/setup_mailcatcher.sh”
View Mailcatcher install
#!/bin/bash
# Get Mailcatcher setup commands from gist and apply them
curl https://gist.githubusercontent.com/conroyp/741c30c44f5295f41422/raw/f86ee70bede0748292c3a21d34ab23da1696a0dc/setup_mailcatcher.sh | bash
@conroyp
conroyp / Laravel Mailcatcher config
Last active Jan 9, 2019
Laravel mail config for use with Mailcatcher
View Laravel Mailcatcher config
<?php
return [
‘driver’ => ‘smtp’,
'host' => '127.0.0.1',
'port' => 1025,
'username' => '',
'password' => '',
‘encryption’ => false,
‘from’ => [
‘address’ => ‘testaddress@example.com’,
@conroyp
conroyp / setup_mailcatcher.sh
Created Aug 23, 2014
Mailcatcher installation script for Ubuntu 14.04
View setup_mailcatcher.sh
#!/bin/bash
# Install dependencies
apt-get install libsqlite3-dev ruby1.9.1-dev
# Install the gem
gem install mailcatcher
# Make it start on boot
echo "@reboot $(which mailcatcher) --ip=0.0.0.0" >> /etc/crontab
update-rc.d cron defaults
You can’t perform that action at this time.