Skip to content

Instantly share code, notes, and snippets.

View qrush's full-sized avatar
🕸️
Making internets

Nick Quaranto qrush

🕸️
Making internets
View GitHub Profile
lines = File.readlines("/usr/share/dict/american-english")
trumps = lines.select { |line| line =~ /^[a-z]/ }.reject { |line| line =~ /\'/ }.map do |line|
"Trump #{line[0].upcase}#{line[1..-1]}"
end.compact
trumps.shuffle.each { |line| puts line }; nil
#############################################################
# Application
#############################################################
set :application, "" #your app's name here
set :server_ip, "" #your server's ip here
set :deploy_to, "/home/rails/#{application}" #the path to your rails app here
#############################################################
# Servers
# this is in application.rb. Yes, I'm lazy.
# holy mess, batman!
uses_tiny_mce(:options => { :theme => 'advanced',
:mode => "textareas",
:convert_urls => false,
:remove_script_host => true,
:theme_advanced_toolbar_location => "top",
:theme_advanced_toolbar_align => "left",
:theme_advanced_resizing => true,
qrush@q-laptop ~/Sources> git clone git://github.com/why/shoes.git
Initialized empty Git repository in /home/qrush/Sources/shoes/.git/
remote: Counting objects: 5925, done.
remote: Compressing objects: 100% (1774/1774remote: ), done.
remote: Total 5925 (delta 4079), reused 5925 (delta 4079)
Receiving objects: 100% (5925/5925), 1.96 MiB | 225 KiB/s, done.
Resolving deltas: 100% (4079/4079), done.
qrush@q-laptop ~/Sources> cd shoes/
qrush@q-laptop ~/S/shoes> rake
(in /home/qrush/Sources/shoes)
Loading development environment (Rails 2.1.1)
Missing the Rails 2.1.1 gem. Please `gem install -v=2.1.1 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.
qrush@q-imac ~/D/r/medqd> gem list | grep rails
gemsonrails (0.7.2)
rails (2.1.1)
@qrush
qrush / gist:9810
Created September 10, 2008 02:22
Mike,
Hello, I am from approximately two months in the future. On 10/22 at approx 2:34am CET a tachyon
field failure in the main resonating ring of the LHC causes a "temporal blowback". Shortly
thereafter, the resulting destruction of the strong nuclear force causes the world to vaporize in
seconds, while a few of us near the experiment are thrown into a temporal causality loop. While
the predestination event (or as we have come to call it "The Big Rewind") hasn't occurred yet to
you, for us it is about three years in our past. I came across your site looking to see if there
were any other scientists that may have theorized this phenomenon who may be of assistance in
preventing it. This brings me to my point, I have repeatedly checked your site for the past five
Linux mydomain 2.6.24-19-xen #1 SMP Wed Aug 20 21:08:51 UTC 2008 x86_64 GNU/Linux
postfix
2.5.1
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
Sep 11 01:49:19 mydomain postfix/smtpd[11154]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 <marc@mydomain.com>: Recipient address rejec
ted: User unknown in local recipient table; from=<webmaster@mydomain.com> to=<marc@mydomain.com> proto=ESMTP helo=<localhost.localdomain>
S
require File.dirname(__FILE__) + '/../spec_helper'
def check_redirects
[:new, :create, :edit, :update, :delete].each do |action|
it "#{action} should redirect" do
get action
response.should be_redirect
end
end
end
1)
ActiveRecord::RecordInvalid in 'Page should create a new instance given valid attributes'
Validation failed:
/Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/validations.rb:923:in `save_without_dirty!'
/Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/dirty.rb:83:in `save_without_transactions!'
/Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/transactions.rb:110:in `save!'
/Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in `transaction'
/Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/transactions.rb:79:in `transaction'
/Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/transactions.rb:98:in `transaction'
/Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/transactions.rb:110:in `save!'