This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
machine 'db' do | |
recipe 'mysql' | |
end | |
machine 'web1' do | |
recipe 'apache' | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
VERSION=`grep 'version' metadata.rb | grep -o "[0-9.]" | tr -d '\n'''` | |
git tag -d $VERSION | |
git push origin :refs/tags/$VERSION |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ($argc == 1) { | |
die("Specify a url!"); | |
} | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $argv[1]); | |
curl_setopt($ch, CURLOPT_VERBOSE, true); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hi Andy, | |
Yes certainly, I need some information from you please: | |
Address: | |
Contact number: | |
Card details to confirm the booking, you can call with these if you wish, | |
Card type: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe package('httpd'), :if => os[:family] == 'redhat' do | |
it { should be_installed } | |
end | |
describe package('apache2'), :if => os[:family] == 'ubuntu' do | |
it { should be_installed } | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
execute 'create-ssh-key-' + account_id do | |
user account_id | |
cwd user_home | |
environment( | |
'HOME' => user_home, | |
'USER' => account_id | |
) | |
command 'ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa' | |
not_if { ::File.exist?(File.join(user_home, '.ssh', 'id_rsa')) } | |
end |