Skip to content

Instantly share code, notes, and snippets.

Ben Edmunds benedmunds

Block or report user

Report or block benedmunds

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 gist:8046389
curl -s | xargs -0I {} git commit -m 'Your commit message' -m "{}"
benedmunds / gist:6530884
Created Sep 11, 2013
Home Brew - Script to switch between PHP 5.3 and 5.4
View gist:6530884
# php switch for homebrew
# $ brew tap josegonzalez/php && brew install php53 --with-mysql && brew install php54 --with-mysql
# Might as well ask for password up-front, right?
sudo -v
VERSION_FILE="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/php-switch.version"
benedmunds / MY_Session.php
Created Jul 15, 2013
MY_Session to enable native PHP sessions in CodeIgniter
View MY_Session.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class MY_Session extends CI_Session
public function __construct($params = array())
log_message('debug', "Session Class Initialized");
// Set the super object to a local variable for use throughout the class
$this->CI =& get_instance();
benedmunds / gist:2881995
Created Jun 6, 2012
Ion Auth - Restrict emails when registering
View gist:2881995
class users_m()
function restrict_email()
$emails = array('', '');
benedmunds / gist:2783232
Created May 24, 2012
Shitty way to remove dups from a php array
View gist:2783232
foreach ($arr1 as $k => $v)
if (array_search($v, $arr2) !== FALSE)
benedmunds / gist:2424724
Created Apr 19, 2012
Customized spacelab bootstrap css
View gist:2424724
* Bootstrap v2.0.2
* Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0
* Designed and built with all the love in the world @twitter by @mdo and @fat.
benedmunds / gist:2415063
Created Apr 18, 2012
Ion Auth - get users groups
View gist:2415063
$this->data['users'] = $this->ion_auth->users()->result();
foreach ($this->data['users'] as $k => $user)
$this->data['users'][$k]->groups = $this->ion_auth->get_users_groups($user->id)->result();
You can’t perform that action at this time.