I hereby claim:
- I am scottwb on github.
- I am scottwb (https://keybase.io/scottwb) on keybase.
- I have a public key ASDC8tX5gl6bMMaEnHY4UeW1PDECJCiF7S2vqTuQLWSt7wo
To claim this, I am signing this object:
# Add these methods to your ApplicationController. Then, any controller | |
# that inherits from it will have these methods and can programmatically | |
# determine what filters it has set. | |
class ApplicationController < ActionController::Base | |
def self.filters(kind = nil) | |
all_filters = _process_action_callbacks | |
all_filters = all_filters.select{|f| f.kind == kind} if kind | |
all_filters.map(&:filter) | |
end |
# Get the SHA of some branch. There must be a better way to do this. | |
git log -1 --pretty=oneline origin/somebranch | sed -E "s/^([^[:space:]]+).*/\1/" |
http { | |
# Default virtual host for www.example.com. This will pick up all HTTP | |
# requests to port 80 that are not for one of the other virtual hosts. | |
server { | |
listen 80; | |
server_name www.example.com; | |
# ...your server config here... |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env/ruby | |
require 'socket' | |
# AWS API Credentials | |
AWS_ACCESS_KEY_ID = "your-aws-access-key-id" | |
AWS_SECRET_ACCESS_KEY = "your-aws-secret-access-key" | |
# Node details | |
NODE_NAME = "webserver-01.example.com" |
#!/usr/bin/env ruby | |
# | |
# A hook script to verify that only syntactically valid ruby code is commited. | |
# Called by git-commit with no arguments. The hook should | |
# exit with non-zero status after issuing an appropriate message if | |
# it wants to stop the commit. | |
# | |
# Put this code into a file called "pre-commit" inside your .git/hooks | |
# directory, and make sure it is executable ("chmod +x .git/hooks/pre-commit") | |
# |
#!/usr/bin/env ruby | |
# | |
# Example showing how to make including a mixin override instance methods. | |
# | |
module TalksLikeMrT | |
def self.included(klass) | |
(klass.instance_methods & self.instance_methods).each do |method| | |
klass.instance_eval{remove_method method.to_sym} | |
end |
SSH_USER = 'root' | |
SSH_HOST = 'www.example.com' | |
SSH_DIR = '/var/www/html/www.example.com' | |
desc "Build the website from source" | |
task :build do | |
puts "## Building website" | |
status = system("middleman build --clean") | |
puts status ? "OK" : "FAILED" | |
end |
diff --git a/cookbooks/php/providers/pear.rb b/cookbooks/php/providers/pear.rb | |
index ca473b5..db90e17 100644 | |
--- a/cookbooks/php/providers/pear.rb | |
+++ b/cookbooks/php/providers/pear.rb | |
@@ -258,13 +258,13 @@ def pecl? | |
@pecl ||= begin | |
# search as a pear first since most 3rd party channels will report pears as pecls! | |
search_cmd = "#{node['php']['pear']} -d" | |
- search_cmd << " preferred_state=#{can_haz(@new_resource, preferred_state)}" | |
+ search_cmd << " preferred_state=#{can_haz(@new_resource, "preferred_state")}" |
function shouldLogOutIdleSession() { | |
return false; | |
} |