Skip to content

Instantly share code, notes, and snippets.

@mistersourcerer
mistersourcerer / db_migrate_all.rake
Created November 2, 2010 20:13
Migrate all environments
namespace :db do
desc "Migrate all enviroments"
namespace :migrate do
task :all do
#current_rails_env = Rails.env
db_config = YAML::load(File.read(File.join(Rails.root, "/config/database.yml")))
db_config.keys.each do |e|
#Rails.env = e
#Rake::Task['db:migrate'].invoke
puts "migrating: #{e}"
(function($) {
$.extend({
mocker: {
sleeper: function() {},
ajax: function() {},
ajaxRequestData: {},
}
});
$.mocker.sleeper = function(milisecs, func) {
#!/bin/bash
# Script created by
# Romeo-Adrian Cioaba [email protected]
# Super minor updates by jason.melton[at]gmail[dot]com
# Updates by Alejandro Cuervo 3[at]cuervo[dot]net
# Released under GPL
echo "Closing Firefox"
sudo killall -9 firefox
git log | grep Author | sort | uniq
cucumber features/client.feature -f pretty
require "rubygems"
require "celerity"
module Screwlerity
class Runner
def initialize(browser = Celerity::Browser.new)
@browser = browser
end
def run_all
$(document).ready(function(){
$("#link_to_worksforme_jquery").click(function()
{
window.open('http://worksforme.com.br', 'poopup',
'toolbar=no, width=300, height=300, statusbar=no');
return false;
});
});
function worksforme_click_link()
{
all_links = document.getElementsByTagName("a");
link = null;
for(i=0; i < all_links.length; i++)
{
link = all_links[i];
is_my_link = link.id == "link_to_worksforme";
if ( is_my_link )
{
<a href="http://worksforme.com.br"
id="link_to_worksforme">Worksforme 3</a>
<a href="#" onclick="javascript:window.open('http://worksforme.com.br',
'poopup',
'toolbar=no, width=300, height=300, statusbar=no')">Worksforme 2</a>