Skip to content

Instantly share code, notes, and snippets.

View justi's full-sized avatar

Justyna Wojtczak justi

View GitHub Profile
@rdj
rdj / active_admin.rb
Created July 1, 2011 06:39
active_admin custom filter
# config/initializers/active_admin.rb
require 'active_admin_custom_filter'
ActiveAdmin.setup do |config|
# ...
end
@bbonamin
bbonamin / Gemfile
Created October 3, 2011 01:52
rails3-jquery-autocomplete in ActiveAdmin?
source 'http://rubygems.org'
gem 'rails3-jquery-autocomplete'
@steveclarke
steveclarke / capybara.md
Created April 10, 2012 17:32
RSpec Matchers

Capybara

save_and_open_page

Matchers

have_button(locator)
@rtekie
rtekie / subdomains.rb
Created May 14, 2012 13:14
Support for Rspec / Capybara subdomain integration testing
# Support for Rspec / Capybara subdomain integration testing
# Make sure this file is required by spec_helper.rb
#
# Sample subdomain test:
# it "should test subdomain" do
# switch_to_subdomain("mysubdomain")
# visit root_path
# end
DEFAULT_HOST = "lvh.me"
@johnjohndoe
johnjohndoe / redmine-osx-installation.md
Created May 21, 2012 16:51
Redmine installation on MacOSX

Redmine installation on MacOSX

  • A summarized instruction tested on MacOSX 10.7.4 installing Ruby 1.9.3p194 and Rails 3.2.3.

Install brew

  • Follow the instructions on https://github.com/mxcl/homebrew
  • $ /usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"

brew hints

@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active November 17, 2024 13:10
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'