This file contains 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
# manifests/capistrano_role/app.rb | |
module CapistranoRole | |
module App | |
def app_stack | |
recipe :memcached | |
end | |
end | |
end |
This file contains 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
/* | |
* Bookmarklet for viewing source in iPad Safari | |
* Originally from http://www.ravelrumba.com/blog/ipad-view-source-bookmarklet/ | |
*/ | |
javascript:(function(){ | |
var w = window.open('about:blank'), | |
s = w.document; | |
s.write('<!DOCTYPE html><html><head><title>Source of ' + location.href + '</title><meta name="viewport" content="width=720, maximum-scale=1.0, minimum-scale=1.0, initial-scale=1.0" /></head><body></body></html>'); |
This file contains 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
$ turn exec-testing.rb | |
Loaded suite | |
TestCases | |
test: #{CLIENT} "*?{}[]" PASS | |
test: #{CLIENT} "something ; echo anything" PASS | |
test: #{CLIENT} "something with quotes" PASS | |
test: #{CLIENT} "something | cat" PASS | |
test: #{CLIENT} $PWD $USER "$HOME $SHELL" PASS | |
test: #{CLIENT} singlearg PASS | |
test: #{CLIENT} something * PASS |
This file contains 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
diff --git a/ext/extconf.rb b/ext/extconf.rb | |
index 48d052a..e82989e 100644 | |
--- a/ext/extconf.rb | |
+++ b/ext/extconf.rb | |
@@ -68,6 +68,10 @@ def check_libmemcached | |
puts(cmd = "patch -p1 -Z < sasl.patch") | |
raise "'#{cmd}' failed" unless system(cmd) | |
+ puts "Touching aclocal.m4 in libmemcached." | |
+ puts(cmd = "touch -r #{BUNDLE_PATH}/m4/visibility.m4 #{BUNDLE_PATH}/configure.ac #{BUNDLE_PATH}/m4/pandora_have_sasl.m4") |
This file contains 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
CRYPT [132 : 0] eric@alien:/home/eric > sudo gem install memcached | |
Building native extensions. This could take a while... | |
ERROR: Error installing memcached: | |
ERROR: Failed to build gem native extension. | |
/usr/bin/ruby extconf.rb | |
Building libmemcached. | |
tar xzf libmemcached-0.32.tar.gz 2>&1 | |
Patching libmemcached source. | |
patch -p1 -Z < libmemcached.patch |
This file contains 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
# List what ports are in use on OS X | |
sudo lsof -iTCP -sTCP:LISTEN |
This file contains 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 ruby | |
# | |
# A simple tool to run php-based AGIs | |
# | |
# by Eric Lindvall <[email protected]> | |
# | |
# Usage: agi_handler.rb 4755 'php php_agi.php' | |
# |
This file contains 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
<!-- You'll need this in your <head> somewhere --> | |
<script src="http://www.google.com/jsapi" type="text/javascript"></script> | |
<script type="text/javascript"> | |
google.load("gdata", "1.x", { packages : ["calendar"] }); | |
</script> |
This file contains 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 ruby | |
# | |
# linux-meminfo | |
# | |
# by Eric Lindvall <[email protected]> | |
# | |
# Gather more useful memory statistics for SNMP | |
# | |
# To see the example output, run: | |
# linux-meminfo.rb -g .1.3.6.1.4.1.2021.4.6.0 |
This file contains 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
namespace :bundler do | |
task :symlink_vendor do | |
shared_gems = File.join(shared_path, 'vendor/bundler_gems/ruby/1.8') | |
release_gems = File.join(release_path, 'vendor/bundler_gems/ruby/1.8') | |
cmd = %w(gems specifications).collect do |sub_dir| | |
shared_sub_dir = File.join(shared_gems, sub_dir) | |
"mkdir -p #{shared_sub_dir} && mkdir -p #{release_gems} && ln -s #{shared_sub_dir} #{release_gems}/#{sub_dir}" | |
end.join(' && ') |