Skip to content

Instantly share code, notes, and snippets.

View maxmanders's full-sized avatar

Max Manders maxmanders

View GitHub Profile
class mysql::databases {
# Helper resource to create databases and associated grants.
define createdb {
exec { "create-${name}-db":
unless => "mysql -uroot -p${config::mysqlRootPassword} ${name}",
command => "mysql -uroot -p${config::mysqlRootPassword} -e \"create database ${name}; grant all on ${name}.* to ${config::dbUser}@localhost identified by '${config::dbPassword}';\"",
require => Service["mysql"],
}
}
protected function _initActionHelpers()
{
$this->_initDoctrine();
Zend_Controller_Action_HelperBroker::addPath(
APPLICATION_PATH . '/controllers/helpers'
);
$registry = Zend_Registry::getInstance();
$entityManager = $registry['entitymanager'];
namespace SpecdIt\Entity;
use \Doctrine\Common\Collections\ArrayCollection;
/**
* @Entity(repositoryClass="SpecdIt\Entity\Repository\UserRepository")
* @Table(name="user",uniqueConstraints={@UniqueConstraint(name="user_email_idx",columns={"email"})})
* @HasLifeCycleCallbacks
*/
class User implements Zend_Acl_Role_Interface
@maxmanders
maxmanders / DejaVuSansMono-Bold-Powerline.ttf
Created August 21, 2012 21:28
DejaVu Sans Mono patched for vim-powerline
name "base"
description "Base Role - All Nodes"
recipies = [
'"recipe[sudo]"',
'"recipe[apt]"',
'"recipe[git]"',
'"recipe[build-essential]"',
'"recipe[vim]"'
]
name "base"
description "Base Role - All Nodes"
recipies = [
"recipe[sudo]",
"recipe[apt]",
"recipe[git]",
"recipe[build-essential]",
"recipe[vim]"
]
name "django-server"
description "Django Server Role"
all_env = [
"role[base]",
"recipe[python]",
"recipe[nginx]",
"recipe[gunicorn]",
]
➜ django-ukgeocode git:(develop) ✗ sudo gem install ruby-shadow
Password:
Building native extensions. This could take a while...
ERROR: Error installing ruby-shadow:
ERROR: Failed to build gem native extension.
/Users/maxmanders/.rvm/rubies/ruby-1.9.2-p320/bin/ruby extconf.rb
checking for getspent() in -lshadow... no
checking for getspent()... no
checking for fgetspent()... no
O2: Just a little reminder. We're automatically giving you 10% of July's subscription back on your September bill. Find out more at http://blog.o2.co.uk