Skip to content

Instantly share code, notes, and snippets.

View salgo's full-sized avatar

Andy Gale salgo

View GitHub Profile
@salgo
salgo / gist:8d0631b5c41d09bb47b8
Created October 2, 2014 09:22
Little bit of bash to create a new tag for a Chef cookbook
#!/usr/bin/env bash
VERSION=`grep 'version' metadata.rb | grep -o "[0-9.]" | tr -d '\n'''`
git tag -a $VERSION -m $VERSION
git push origin --tags
machine 'db' do
recipe 'mysql'
end
machine 'web1' do
recipe 'apache'
end
$dns_hack = <<SCRIPT
echo "; generated by /sbin/dhclient-script
search home
nameserver 8.8.8.8
" > /etc/resolv.conf
SCRIPT
Vagrant.configure("2") do |config|
node.default['mysql']['client']['packages'] = ['mysql55w', 'mysql55w-devel']
node.default['php']['packages'] = ['php54w', 'php54w-devel', 'php54w-cli', 'php54w-pear']
packages = %w{php54w-mysql php54w-mcrypt php54w-pdo php54w-xml php54w-gd}
conflicting_packages = %w{mysql-libs}
if conflicting_packages
conflicting_packages.each do |p|
package p do
action :remove
end
#
# Cookbook Name:: web-base
# Recipe:: yum-webtatic
#
# Copyright 2014, Hello Future Ltd
#
# All rights reserved - Do Not Redistribute
#
rpm_path = File.join(Chef::Config[:file_cache_path], 'webtatic_repo_latest.rpm')
14:50 <@gale> ward is latin for son of northern monkey
14:50 <@gale> ho means boy
14:50 <@gale> ward is something in a hospital
14:51 <@gale> howard was bonr in a hospital
14:51 <@gale> OOOO
14:51 <@gale> it's all related
14:51 <@gale> Paul was in the bible
14:51 <@gale> Howard wasn't
14:51 <@gale> Howard is therefore the devil
14:51 <@gale> oooooo
Stephen,
I'm writing with reference to the Data Retention and Investigation
Powers Bill that your government are rushing through parliament. I
appreciate this bill is not the controversial "Snoopers Charter" but I
really must object to any bill which impinges on my civil liberties
and privacy being sneaked through parliament before the summer break.
It's vital that legislation in such key areas are properly debated. I
do not accept the argument the bill will only restore existing powers.
@salgo
salgo / gist:9780088
Created March 26, 2014 10:03
Damn you Joe and Carlton
MultipleObjectsReturned: get() returned more than one PlayerFixture -- it returned 2! Lookup parameters were {'started': False, 'player__parse_name': u'Cole', 'team': <Team: West Ham>}
Hi Andy,
We are fine to not do any further work on this for you, however our 20 years experience within the recruitment industry and the law surrounding it. would advise you not to proceed with Rhys if you do not want to be held liable for the terms as the interviewing and subsequent engagement of a candidate is deemed acceptance of our terms. Alternatively, if you do wish to meet him (and I do think he would be strong), I am fine to look at the fee rates with you if that is you objection and see if we can put something more favorable in place for you. Entirely up to you.
Regards
Cloud Hosting
Auto-scaling
Chef
Amazon AWS
Rackspace
DevOps
Continuous Delivery
Test Driven Infrastructure
Capacity Planning
Development