Skip to content

Instantly share code, notes, and snippets.

View jimbojsb's full-sized avatar

Josh Butts jimbojsb

View GitHub Profile
@jimbojsb
jimbojsb / gist:4253495
Created December 10, 2012 21:16
kitchen sink php configure script
'./configure' \
'--prefix=/usr/local' \
'--with-config-file-path=/usr/local/etc' \
'--enable-mbstring' \
'--with-zlib' \
'--with-openssl' \
'--with-curl' \
'--enable-fpm' \
'--with-config-file-path=/usr/local/etc' \
'--enable-ftp' \
@jimbojsb
jimbojsb / README.md
Last active October 17, 2015 20:58
Zendcon Docker Tutorial README

Is there anythign I should read ahead of time?

Probably not, we're going to cover Docker from basic concepts into a working PHP app environment

Should I install any software?

Yes and no. While I will strive to make this session as interactive as possible, working with Docker does involve moving a good bit of data around, and we are at the mercy of Conference Wifi. The tutorial will be geared towards MacOS and Linux users but should be equally doable on Windows, though I have no personal experience using Docker on Windows.

I definitely encourage you to install the software locally and work along with what I'm demonstrating. I will cover basic installation and setup but won't have time to get into issues with anyone's specific system.

I will be working through the content with the following:

  • Docker 1.6.2
@jimbojsb
jimbojsb / jira-agile.md
Last active December 11, 2015 15:28
Disable Jira Agile / GreenHopper issue detail view on Kanban Board
  1. Get a user style tool for your browser of choice. I used Stylish for Chrome
  2. Add a stylesheet for your jira hostname with the following:
#ghx-detail-view {
    display: none;
}
@jimbojsb
jimbojsb / gist:4696172
Created February 2, 2013 05:03
new router syntax
$router['homepage']('GET /', function() {
echo 'hi';
});
@jimbojsb
jimbojsb / gist:4942515
Last active December 13, 2015 16:48
Parse behat data tables into mongo documents
/**
* @Given /^existing "([^"]*)" with data:$/
*/
public function existingWithData($arg1, TableNode $table)
{
$collection = $arg1;
foreach ($table->getHash() as $row) {
$data = array();
foreach ($row as $key => $value) {
if (strpos($key, "[]") !== false) {
<?php
/** @var $router \Piano\Router */
$router = $app->router;
$router->addRoute('redirect', new \Genoa\Route\Redirect);
$router['homepage'] ('GET /', '\Genoa\Controller\Homepage.index');
$router['tag'] ('GET /:tag-deals', '\Genoa\Controller\Tag.index');
$router['outbound'] ('GET /outbound/:id', '\Genoa\Controller\Outbound.index');
$router['about'] ('GET /about', '\Genoa\Controller\About.index', ['viewscript' => 'about']);
{
"_id": "foo",
"mapping": {
"1->2->3": "tag1",
"$woozles!!": "tag2"
},
"origin": {
"name": "Walmart.com",
"slug": "walmart"
}
@jimbojsb
jimbojsb / DocumentTest.php
Last active December 14, 2015 20:19
setget test
public function testSetGet()
{
$d = new Document;
$d->foo[] = 'bar';
$this->assertEquals(['bar'], $d->foo);
$d->bar = 'baz';
$test = $d->bar;
$test = 'foo';
@jimbojsb
jimbojsb / Cjftp.php
Created March 15, 2013 19:27
splfileobject
<?php
namespace Genoa\Data\Transport;
use Genoa\Model\Provider;
use Psr\Log\LoggerInterface;
class Cjftp extends \SplFileObject
{
const TEMP_DIR = "/tmp/genoa";
@jimbojsb
jimbojsb / Breadcrumbs.php
Created March 18, 2013 16:20
viewhelper
<?php
namespace Genoa\Viewhelper;
class Breadcrumbs
{
protected $crumbs;
public function __construct($items)
{
foreach ($items as $text => $link) {