Skip to content

Instantly share code, notes, and snippets.

View jasongrimes's full-sized avatar

Jason Grimes jasongrimes

View GitHub Profile
@jasongrimes
jasongrimes / twenty-fourteen-full-width.css
Created September 15, 2014 19:33
Custom CSS to make the Wordpress twenty fourteen theme full-width.
/*
* Tweaks to the default Wordpress twenty fourteen theme to make it full-width.
*/
/* Make entries full-width instead of the default 474px wide. */
.site-content .entry-header,
.site-content .entry-content,
.site-content .entry-summary,
.site-content .entry-meta,
.page-content {
@jasongrimes
jasongrimes / db_master.rb
Created June 6, 2012 15:38
Sample Chef recipe for configuring the master database for a LAMP application.
#
# Cookbook Name:: hello_app
# Recipe:: db_master
#
# Copyright 2012, Jason Grimes
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
@jasongrimes
jasongrimes / webserver.rb
Created June 6, 2012 15:02
Sample Chef recipe for configuring the webserver for a LAMP application.
#
# Cookbook Name:: hello_app
# Recipe:: webserver
#
# Copyright 2012, Jason Grimes
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
@jasongrimes
jasongrimes / Vagrantfile
Created June 6, 2012 01:16
Sample Vagrant config file for LAMP dev environment provisioned by Chef
Vagrant::Config.run do |config|
config.vm.box = "precise64"
config.vm.forward_port 80, 8080
config.vm.customize [
"modifyvm", :id,
"--name", "LAMP VM",
"--memory", "2048"
]
@jasongrimes
jasongrimes / jkg.json
Created June 5, 2012 21:53
Sample data bag file for Chef "user" cookbook.
{
"id": "jkg",
"ssh_keys": "ssh-rsa ...LoNgGobBleDyGookSshPuBl1cKey... jason@grimesit.com",
"groups": [ "sysadmin", "dba", "devops" ],
"uid": 2001,
"shell": "\/bin\/bash"
}
@jasongrimes
jasongrimes / db_master.rb
Created June 5, 2012 21:23
Sample Chef role description for the master database in a LAMP stack.
name "db_master"
description "Master database server"
all_env = [
"role[base]",
"recipe[mysql::server]"
]
run_list(all_env)
@jasongrimes
jasongrimes / base.rb
Created June 5, 2012 21:14
Sample Chef role description for a base Ubuntu server.
name "base"
description "Base role applied to all nodes."
run_list(
"recipe[users::sysadmins]",
"recipe[sudo]",
"recipe[apt]",
"recipe[git]",
"recipe[build-essential]",
"recipe[vim]"
)
@jasongrimes
jasongrimes / webserver.rb
Created June 5, 2012 21:11
Sample Chef role description for a LAMP web server.
name "webserver"
description "Web server role"
all_env = [
"role[base]",
"recipe[php]",
"recipe[php::module_mysql]",
"recipe[apache2]",
"recipe[apache2::mod_php5]",
"recipe[apache2::mod_rewrite]",
]
@jasongrimes
jasongrimes / Album.php
Created June 3, 2012 03:19
Album entity for extending Akrabat's ZF tutorial to use Doctrine
<?php
namespace Album\Entity;
use Doctrine\ORM\Mapping as ORM;
use Zend\InputFilter\InputFilter;
use Zend\InputFilter\Factory as InputFactory;
use Zend\InputFilter\InputFilterAwareInterface;
use Zend\InputFilter\InputFilterInterface;
@jasongrimes
jasongrimes / module.config.php
Created May 3, 2012 02:15
Extension of Akrabat's ZF2 tutorial adding support for Doctrine.
<?php
namespace Album;
use PDO;
return array(
'di' => array(
'instance' => array(
'alias' => array(
'album' => 'Album\Controller\AlbumController',