Skip to content

Instantly share code, notes, and snippets.

View rimian's full-sized avatar

Rimian Perkins rimian

View GitHub Profile
- form_for @sock, :html => { :multipart => true } do |f|
- if @sock.errors.any?
#error_explanation
%h
= pluralize(@sock.errors.count, "error")
prohibited this sock from being saved:
%ul
- @sock.errors.full_messages.each do |msg|
diff --git modules/menu/menu.install modules/menu/menu.install
index 717c5e7..fa8d21b 100644
--- modules/menu/menu.install
+++ modules/menu/menu.install
@@ -42,17 +42,25 @@ function menu_schema() {
/**
* Implements hook_install().
+ *
+ * This has been patched because there is no real way of modifying this afterwards.
@rimian
rimian / gist:1303200
Created October 21, 2011 05:59
testing something is in the DOM
Given I am an unauthenticated user
When I visit the home page
Then I should see these links
| link |
| Foo |
| Bar |
<?php
/**
* @file tamauth.module
*
* Authenticate with Tivoli
*
* @see http://www-01.ibm.com/software/tivoli
*/
/**
@rimian
rimian / gist:1323971
Created October 29, 2011 01:37
Set headers capybara / mechanize
#env.rb
begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
require 'capybara'
require 'capybara/dsl'
require 'capybara/cucumber'
require 'selenium-webdriver'
require 'capybara/mechanize/cucumber'
World do
Capybara.default_driver = :mechanize
@rimian
rimian / gist:1821908
Created February 14, 2012 00:35
homebrew install postgres error
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by PostgreSQL configure 9.1.2, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ ./configure --disable-debug --prefix=/usr/local/Cellar/postgresql/9.1.2 --datadir=/usr/local/Cellar/postgresql/9.1.2/share/postgresql --docdir=/usr/local/Cellar/postgresql/9.1.2/share/doc/postgresql --enable-thread-safety --with-bonjour --with-gssapi --with-krb5 --with-openssl --with-libxml --with-libxslt --with-ossp-uuid --with-python --with-perl ARCHFLAGS='-arch x86_64'
## --------- ##
## Platform. ##
@rimian
rimian / gist:1821976
Created February 14, 2012 00:48
Brew install postgres output
$ brew install -v postgres
/usr/local/bin/brew:74: warning: Insecure world writable dir /usr/local/Library in PATH, mode 040777
/usr/local/Library/Homebrew/build.rb:7: warning: Insecure world writable dir /usr/local/Library in PATH, mode 040777
==> Downloading http://ftp.postgresql.org/pub/source/v9.1.2/postgresql-9.1.2.tar.bz2
File already downloaded in /Users/rimian/Library/Caches/Homebrew
/usr/bin/tar xf /Users/rimian/Library/Caches/Homebrew/postgresql-9.1.2.tar.bz2
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:243: command not found: uuid-config --cflags
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:243: command not found: uuid-config --ldflags
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:243: command not found: uuid-config --libs
==> ./configure --disable-debug --prefix=/usr/local/Cellar/postgresql/9.1.2 --datadir=/usr/local/Cellar/postgresql/9.1.2/share/postgresql --docdir=/usr/local/Cel
@rimian
rimian / big iframe document
Created May 11, 2012 02:42
big iframe document
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Test for large thing in iframe</title>
</head>
<body>
<div style="width: 2200px; height: 700px; background: gold;"> </div>
</body>
</html>
@rimian
rimian / best_practice_request_specs
Created May 17, 2012 04:32
best practice request specs
require 'spec_helper'
describe "request spec test" do
before(:each) do
#log into devise (testing sub domains with capybara work around)
create_user()
sign_in
click_link_to_a_page()
end
@rimian
rimian / ima.md
Created May 24, 2012 12:57 — forked from radar/ima.md

You don't drink beer, oh ok well I didn't know that you just said false things for the fun of it, why would you make multiple references to drinking beer at railscamp if you don't drink any beer? Or do you just put out a different appearance in public than you do in private?