This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% [:notice, :error, :alert].each do |level| %> | |
<% unless flash[level].blank? %> | |
<div class="alert <%= flash_class(level) %>"> | |
<a class="close" href="#">×</a> | |
<%= content_tag :p, flash[level] %> | |
</div> | |
<% end %> | |
<% end %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Adium" | |
set eu to "[email protected]" | |
set gay to text returned of ¬ | |
(display dialog ¬ | |
"Quem é o Gay?" with title ¬ | |
"Putz! Que viadão!" with icon stop ¬ | |
default answer ¬ | |
"" buttons {"Vai…"} ¬ | |
default button 1) | |
tell account eu to set theChat to make new chat with contacts {contact gay} with new chat window |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'rails', '3.2.13' | |
gem 'mysql2' | |
gem 'devise' | |
gem 'devise-i18n' | |
group :assets do | |
gem 'sass-rails', '~> 3.2.3' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gistsource 'https://rubygems.org' | |
gem 'rails', '3.2.13' | |
gem 'mysql2' | |
gem 'devise' | |
gem 'devise-i18n' | |
group :assets do | |
gem 'sass-rails', '~> 3.2.3' | |
gem 'coffee-rails', '~> 3.2.1' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
class User < AcriveRecord::Base | |
has_many :suggestions | |
end | |
class Product < AcriveRecord::Base | |
has_many :suggestions | |
end | |
class Suggestion < AcriveRecord::Base |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant::Config.run do |config| | |
config.vm.box = "lucid32" | |
config.vm.forward_port 80, 8080 | |
config.vm.forward_port 3306, 8336 | |
config.vm.provision :puppet do |puppet| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ServerAdmin webmaster@localhost | |
DocumentRoot /vagrant/sites | |
<Directory /> | |
Options FollowSymLinks | |
AllowOverride None | |
</Directory> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# first install 'selenium-webdriver'gem | |
require 'selenium-webdriver' | |
width = 800 | |
height = 600 | |
driver = Selenium::WebDriver.for :firefox | |
driver.navigate.to 'http://localhost:3000' | |
driver.execute_script %Q{ | |
window.resizeTo(#{width}, #{height}); | |
} | |
driver.save_screenshot('/tmp/screenshot.png') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE wp_options SET option_value = replace(option_value, 'http://__www.old-site.com__', 'http://__www.new-site.com__') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://__www.old-site.com__','http://__www.new-site.com__'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://__www.old-site.com__', 'http://__www.new-site.com__'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for file in *.php; do file --mime $file; | |
done |