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
# Add this line to your postfix main.cf file to add VERP support. | |
smtpd_authorized_verp_clients = $mynetworks |
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 'rubygems' | |
require 'aws/s3' | |
require 'logger' | |
AWS::S3::S3Object.class_eval do | |
def self.copy_across_buckets(src_bucket, src_key, dest_bucket, dest_key, options = {}) | |
src_bucket = bucket_name(src_bucket) | |
dest_bucket = bucket_name(dest_bucket) | |
source_key = path!(src_bucket, src_key) |
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 ruby -wKU | |
require 'fileutils' | |
TV_DIR = File.expand_path("~/Movies/TV") | |
EP_PATTERN = /^([a-z\.]+)\.((?:S[\d]+E[\d]+)|(?:[\dx\.]+))\..+\.(?:avi|mkv|mp4|mpg|mpeg)$/i | |
files = Dir[File.join(TV_DIR,'*')] | |
files.each do |f| |
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
# I'm currently using Devise along with Resque's resque-web UI. I have resque-web running | |
# as an embedded rack application inside of my main Rails app with the following line in my | |
# my routes.rb file: | |
# | |
# mount Resque::Server.new, :at => "/resque" | |
# | |
# This makes resque-web expect its static assets to be found in your site's /public/resque | |
# folder, where they won't be. | |
# | |
# The answer is to copy or symlink to those assets which are found in the gem's own public |
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
<html> | |
<head> | |
<style> | |
div { | |
border: 1px solid black; | |
margin-right: 10px; | |
padding: 10px; | |
} | |
#col1,#col2 { | |
float: left; |
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
[default] [Thu, 15 Sep 2011 18:06:01 +0200] INFO: Processing execute[extract-jruby] action nothing (jruby::default line 16) | |
: stdout | |
[default] [Thu, 15 Sep 2011 18:06:01 +0200] INFO: Processing remote_file[/tmp/jruby-bin-1.6.4.tar.gz] action create (jruby::default line 24) | |
: stdout | |
[default] [Thu, 15 Sep 2011 18:06:57 +0200] INFO: Chef Run complete in 57.277101 seconds | |
: stdout | |
[default] [Thu, 15 Sep 2011 18:06:57 +0200] INFO: Running report handlers | |
: stdout | |
[default] [Thu, 15 Sep 2011 18:06:57 +0200] INFO: Report handlers complete | |
: stdout |
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
# Rather than going nuclear and downgrading Xcode or using some other big GCC installer, | |
# this worked for me... | |
# From https://github.com/mxcl/homebrew/wiki/Custom-GCC-and-cross-compilers | |
brew install https://raw.github.com/Homebrew/homebrew-dupes/master/apple-gcc42.rb | |
# Path may vary slightly... | |
export CC=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 | |
# If you've attempted to install REE previously and it failed... |
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
# In a worker class, all defined public methods will be marked to run in the | |
# background | |
class Worker | |
include TorqueBox::Messaging::Backgroundable | |
def self.method_added(method_name) | |
return if method_name.to_s =~ /^__a?sync/ # avoid infinite loop | |
return unless public_method_defined?(method_name) | |
always_background method_name | |
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
knife bootstrap IP_ADDRESS -N NODE_NAME -d ubuntu12.04-gems |
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
========================================================================= | |
JBoss Bootstrap Environment | |
JBOSS_HOME: /opt/torquebox/jboss | |
JAVA: java | |
JAVA_OPTS: -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms3098m -Xmx3098m -XX:MaxPermSize=512m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml -Xss2048k |
OlderNewer