Skip to content

Instantly share code, notes, and snippets.

View craigmarvelley's full-sized avatar

Craig Marvelley craigmarvelley

View GitHub Profile
@everzet
everzet / behat.yml
Created March 31, 2014 09:22
Registering custom context initializers with behat 3
default:
extensions:
custom_extension.php: ~
@shaneog
shaneog / update_acl.rb
Created August 30, 2011 16:20
Capifony Task to Set ACLs on Symfony2 app/cache and app/logs directories as per http://symfony.com/doc/current/book/installation.html
# Change ACL on the app/logs and app/cache directories
after 'deploy', 'deploy:update_acl'
# This is a custom task to set the ACL on the app/logs and app/cache directories
namespace :deploy do
task :update_acl, :roles => :app do
shared_dirs = [
app_path + "/logs",
@orta
orta / Podfile.ruby
Created October 22, 2015 07:42
make frameworks the same as your bundle id
post_install do |installer|
app_plist = "Emergence/Info.plist"
plist_buddy = "/usr/libexec/PlistBuddy"
version = `#{plist_buddy} -c "Print CFBundleShortVersionString" #{app_plist}`.split
puts "Updating CocoaPods' version numbers to #{version}"
installer.pods_project.targets.each do |target|
`#{plist_buddy} -c "Set CFBundleShortVersionString #{version}" "Pods/Target Support Files/#{target}/Info.plist"`
end
end
@shaharke
shaharke / ec2_protect.yml
Created March 15, 2014 17:12
Protecting your production EC2 instanced from termination with Ansible
---
- hosts: all
tasks:
- name: Gather EC2 facts
action: ec2_facts
- name: Turning on termination protection
local_action: command aws ec2 modify-instance-attribute --region {{ ansible_ec2_placement_region }} --instance-id {{ ansible_ec2_instance_id }} --attribute disableApiTermination --value true