Skip to content

Instantly share code, notes, and snippets.

View philsturgeon's full-sized avatar
🌳
Planting Trees

Phil Sturgeon philsturgeon

🌳
Planting Trees
View GitHub Profile
@philsturgeon
philsturgeon / gist:5220258
Created March 22, 2013 10:07
Test PHP 5.5
cd /tmp
git clone http://git.php.net/repository/php-src.git -b PHP-5.5
cd php-src
./buildconf
./configure --disable-all --enable-debug --enable-maintainer-zts
make test
@philsturgeon
philsturgeon / exception
Last active December 15, 2015 02:59
Sentry if v exception
try {
$this->sentry->authenticate(array(
'email' => $email,
'password' => $password,
), (bool) $this->input->post('remember'));
} catch (Cartalyst\Sentry\Users\UserNotFoundException $e) {
// Could not log in with password. Maybe its an old style pass?
try {
@philsturgeon
philsturgeon / gist:4956941
Created February 14, 2013 22:20
Autoload through folder structures and whatnot
def Object.const_missing(name)
@looked_for ||= {}
str_name = name.to_s
raise "Class not found: #{name}" if @looked_for[str_name]
@looked_for[str_name] = 1
file = str_name.gsub!(/(.)([A-Z])/,'\1/\2') && downcase!
@philsturgeon
philsturgeon / jenkins.rb
Created January 30, 2013 22:27
A vague attempt.
#
# Cookbook Name:: kapture
# Recipe:: ci
#
# Future Phil - When shit breaks try this:
# http://sqa.stackexchange.com/questions/5242/jenkins-fails-to-restart-after-updating-plugins
app_name = 'kapture-ci'
app_config = node[app_name]
@philsturgeon
philsturgeon / All Posts
Last active April 16, 2021 13:44
Octopress iTunes Feed
---
layout: post
title: "Episode 3: ExpressionEngine StackExchange"
date: 2012-12-20 10:47
comments: true
filename: some-file-name-without-extension
length: 52409154
summary: ExpressionEngine Pro Anna Brown and Testing Hero Chris Hartjes join Ben Edmunds and Phil Sturgeon to discuss the recent rumblings in the ExpressionEngine community and the new EE StackExchange site. We talk about Inversion of Control (IoC), what it is, why its useful and how it's done.
---
@philsturgeon
philsturgeon / default.rb
Created January 8, 2013 18:02
Get PHP 5.4 in Ubuntu 12.04 (or just upgrade to 12.10)
# Use PHP 5.4
apt_repository "php54" do
uri "http://ppa.launchpad.net/ondrej/php5/ubuntu"
distribution node['lsb']['codename']
components ["main"]
keyserver "keyserver.ubuntu.com"
key "E5267A6C"
end
@philsturgeon
philsturgeon / Gemfile
Last active December 10, 2015 12:08
Create a GPX file of Foursquare checkins
source 'https://rubygems.org'
gem "json"
gem "typhoeus"
gem "quimby"
@philsturgeon
philsturgeon / gist:4197232
Created December 3, 2012 19:15
Lex: Is Monday?
{{ if {helper:date format="D"} == "Mon" }}
<p>Bla</a>
{{ endif }}
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
# Operating System
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"

DON'T BE A DICK PUBLIC LICENSE

Version 1, December 2009

Copyright (C) 2009 Philip Sturgeon email@philsturgeon.co.uk

Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.