Skip to content

Instantly share code, notes, and snippets.

View dalibor's full-sized avatar

Dalibor Nasevic dalibor

View GitHub Profile
@dalibor
dalibor / perform_action_without_rescue hack.rb
Created April 17, 2010 16:37 — forked from soey/perform_action_without_rescue hack.rb
restful_authentication features webrat fix
#Change this:
ActionController::Base.class_eval do
def perform_action
perform_action_without_rescue
end
end
#to:
Then /^(.+) and I confirm dialog box$/ do |step|
bypass_confirm_dialog
Then step
end
@dalibor
dalibor / rails_3_1_beta_1_changes.md
Created May 24, 2011 07:46 — forked from ryanb/rails_3_1_rc4_changes.md
The Changelogs for Rails 3.1 Beta 1

Railties 3.1 Beta 1

  • The -j option of the application generator accepts an arbitrary string. If passed "foo", the gem "foo-rails" is added to the Gemfile, and the application JavaScript manifest requires "foo" and "foo_ujs". As of this writing "prototype-rails" and "jquery-rails" exist and provide those files via the asset pipeline. Default is "jquery". [fxn]

  • jQuery is no longer vendored, it is provided from now on by the jquery-rails gem. [fxn]

  • Prototype and Scriptaculous are no longer vendored, they are provided from now on by the prototype-rails gem. [fxn]

  • The scaffold controller will now produce SCSS file if Sass is available [Prem Sichanugrist]

@dalibor
dalibor / 0-readme.md
Created February 4, 2012 18:45 — forked from burke/0-readme.md
ruby-1.9.3-p0 cumulative performance patch.

Patched ruby 1.9.3-p0 for 30% faster rails boot

What is?

This script installs a patched version of ruby 1.9.3-p0 with patches to make ruby-debug work again (#47) and boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84).

Huge thanks to funny-falcon for the performance patches.

@dalibor
dalibor / wait_until.rb
Created July 17, 2012 11:27 — forked from metaskills/wait_until.rb
Never sleep() using Capybara!
# Have you ever had to sleep() in Capybara-WebKit to wait for AJAX and/or CSS animations?
describe 'Modal' do
should 'display login errors' do
visit root_path
click_link 'My HomeMarks'
within '#login_area' do
fill_in 'email', with: 'will@not.work'
fill_in 'password', with: 'test'
@dalibor
dalibor / 01-vagrant.sh
Created August 5, 2012 08:10 — forked from hakanensari/01-vagrant.sh
Set up an Ubuntu 12.04 Precise box with Vagrant for Ruby and NodeJS development
gem install vagrant
vagrant box add precise64 http://files.vagrantup.com/precise64.box
vagrant init
vagrant up
@dalibor
dalibor / rspec_cucumber_learning.markdown
Created August 22, 2012 07:46 — forked from nebojsaz/rspec_cucumber_learning.markdown
Rspec + Cucumber how to on Codebreaker example

Behavior Driven Development

Description of BDD

  • Domain-driven design

Principles of BDD

  • Enough is enough
@dalibor
dalibor / es.sh
Created September 4, 2012 00:06
Install ElasticSearch on Ubuntu 12.04
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre -y
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.0.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
sudo mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share
@dalibor
dalibor / CNAME
Created October 22, 2012 19:27 — forked from vladan/CNAME
JS пликација за пресметување на плати. Во контролерот се вршат пресметките, другото е само приказ. angular.min.js е ставен за да работи сѐ од 1ва.
kalkulator.ot.mk
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')