Skip to content

Instantly share code, notes, and snippets.

@rgo
rgo / vhost_apache_mongrel.conf
Created November 12, 2009 12:53
Apache configuration to remember (only one mongrel)
# Apache configuration to remember (only one mongrel)
<VirtualHost *:80>
ServerName foo.com
DocumentRoot /home/foo/rails/public
# Uncomment if need pass protection
#<Location / >
#AuthType Basic
#AuthName "Foo Auth."
#AuthUserFile /etc/apache2/password_file
@rgo
rgo / apache_vhost_mongrel_cluster.conf
Created November 12, 2009 13:01
Apache with mongrel_cluster configuration to remember
# Apache configuration to remember
#NameVirtualHost *:80 # Better in apache2.conf
# Fix: "client denied by server configuration"
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
@rgo
rgo / gist:274625
Created January 11, 2010 21:32
How to join/subscribe Google Groups without a Gmail ID
How to join/subscribe Google Groups without a Gmail ID:
http://groups.google.com/group/GroupName/boxsubscribe?email=myid
# Used to graph results from autobench
#
# Usage: ruby autobench_grapher.rb result_from_autobench.tsv
#
# This will generate three svg & png graphs
require "rubygems"
require "scruffy"
require 'csv'
require 'yaml'
@rgo
rgo / capistrano_db_dump_and_clone_to_local.rb
Created March 1, 2010 12:04
Capistrano: Dump and clone to local database
# Directly copied from eycap-0.5.2 (thanks!)
#
# With these tasks you can:
# - dump your production database and save it in shared_path/db_backups
# - dump your production into your local database (clone_to_local)
#
# Tested and fixed by fjguzman
Capistrano::Configuration.instance(:must_exist).load do
namespace :db do
@rgo
rgo / hide_flash_messages_automagically.js
Created March 15, 2010 15:26 — forked from leehambley/gist:332857
Snippet to hide flash messages automagically with jQuery
<%# From pretty_flash by rpheath (improved by pacoguzman) %>
<% if flash.any? -%>
<script type="text/javascript">
$(function() {
setTimeout(hideFlashes, 5000);
});
var hideFlashes = function() {
$("[id^='flash_']").fadeOut(1500);
@rgo
rgo / font faces
Created March 30, 2010 11:42 — forked from javier/font faces
embedding true type fonts in your css
/* Font face generator needed to IE family
* http://www.fontsquirrel.com/fontface/generator
*/
@font-face {
font-family: 'Essays1743Italic';
src: url('Essays1743-Italic.eot');
src: local('☺'), url('Essays1743-Italic.ttf') format('truetype');
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head><title>
Sistema de Información sobre calderas Eficientes
</title><link href="App_Themes/TemaIdae/IDAE.css" rel="stylesheet" type="text/css" />
<style type="text/css">
@rgo
rgo / Gemfile
Created May 23, 2010 01:31 — forked from indirect/Gemfile
# include at least one source and the rails gem
source :gemcutter
gem 'rails', '~> 2.3.5', :require => nil
gem 'sqlite3-ruby', :require => 'sqlite3'
# Devise 1.0.2 is not a valid gem plugin for Rails, so use git until 1.0.3
# gem 'devise', :git => 'git://github.com/plataformatec/devise.git', :ref => 'v1.0'
group :development do
# bundler requires these gems in development
Given /^I will confirm on next step$/ do
begin
evaluate_script("window.alert = function(msg) { return true; }")
evaluate_script("window.confirm = function(msg) { return true; }")
rescue Capybara::NotSupportedByDriverError
end
end