Skip to content

Instantly share code, notes, and snippets.

View benedmunds's full-sized avatar

Ben Edmunds benedmunds

View GitHub Profile
<div class="foo bar"></div>
<div class="foo raa"></div>
@benedmunds
benedmunds / MY_Session.php
Created July 15, 2013 23:14
MY_Session to enable native PHP sessions in CodeIgniter
<?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();
curl -s http://moviecommit.com/clean | xargs -0I {} git commit -m 'Your commit message' -m "{}"
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use PhpAmqpLib\Connection\AMQPStreamConnection;
use PhpAmqpLib\Message\AMQPMessage;
//connect to rabbit server
$connection = new AMQPStreamConnection(
function processCalendarData(cb) {
setTimeout(function(){
cb();
}, 1000);
};
var amqp = require('amqplib/callback_api');
@benedmunds
benedmunds / gist:6530884
Created September 11, 2013 22:52
Home Brew - Script to switch between PHP 5.3 and 5.4
#!/bin/bash
# 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
benedmunds / gist:2424724
Created April 19, 2012 22:50
Customized spacelab bootstrap css
/*!
* Bootstrap v2.0.2
*
* Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
*/
article,