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
From 57dc6a58baeed762981d1a28c0855e651c46982a Mon Sep 17 00:00:00 2001 | |
From: Tim Harper <[email protected]> | |
Date: Sat, 4 Oct 2008 10:05:49 -0600 | |
Subject: [PATCH] add a sensible suffix to the log path, to get rid of all the of tiny unix epoch suffixed files | |
--- | |
config/environments/production.rb | 2 +- | |
1 files changed, 1 insertions(+), 1 deletions(-) | |
diff --git a/config/environments/production.rb b/config/environments/production.rb |
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
require 'tabset_helpers.rb' | |
ActionView::Base.send(:include, TabsetHelpers) |
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
#!/bin/bash | |
branch_name=$(sed 's|ref: refs/heads/||' .git/HEAD) | |
remote_name=${1:-origin} | |
remote_branch=${2:-$branch_name} | |
if [ "$branch_name" == "$(cat .git/HEAD)" ]; then | |
echo "You're not on a branch" | |
exit 1 | |
fi | |
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
cat ruby-enterprise.spec | |
Summary: Ruby Enterprise Edition | |
Name: ruby-enterprise | |
Version: 1.8.6 | |
Release: 20081205 | |
License: GPL | |
Group: Applications/System | |
Source: ruby-enterprise-%{version}-%{release}.tar.gz | |
BuildRoot: /var/tmp/%{name}-%{version}-%{release} | |
%description |
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
# put on the server | |
# put in /etc/puppet/custom/plugins/facter/custom_facts.rb | |
require 'yaml' | |
if File.exist?("/etc/puppet/custom_facts.yml") | |
YAML.load_file("/etc/puppet/custom_facts.yml").each do |key, value| | |
Facter.add(key.to_sym) do | |
setcode { value } | |
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
html = <<-EOF | |
<html> | |
<body> | |
<table> | |
<tr> | |
<td> | |
One | |
<table><tr><td>Nested Cell #1</td></tr></table> | |
</td> | |
</tr> |
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
html = <<-EOF | |
<html> | |
<body> | |
<table> | |
<tr> | |
<td> | |
One | |
<table><tr><td>Nested Cell</td></tr></table> | |
</td> | |
</tr> |
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
top_left = new GLatLng(point.lat() - radius, point.lng() - radius), | |
bottom_right = new GLatLng(point.lat() + radius, point.lng() + radius) | |
this.rectangle = new GRectangle( | |
this.map, | |
top_left, | |
bottom_right, | |
{ | |
line_color: (this.kind == "home") ? "#3355ff" : "#ff5533", | |
fill_color: (this.kind == "home") ? "#335599" : "#995533", |
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 | |
gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f >= 1.9 | |
puts "Loading Rails environment" | |
ENV["RAILS_ENV"] ||= 'test' | |
ENV["DRB"] = 'true' | |
require File.expand_path(File.dirname(__FILE__) + "/../config/environment") unless defined?(RAILS_ROOT) | |
require 'optparse' |
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
require 'autotest/redgreen' | |
module Autotest::Growl | |
def self.notify(title, msg, img) | |
system("osascript ~/bin/growlNotify.scpt '#{title}' '#{msg.inspect}' '#{img}'") | |
end | |
Autotest.add_hook :ran_command do |at| | |
results = [at.results].flatten.join("\n") | |
# rpsec |
OlderNewer