REALLYFUCKINGIMPORTANT
Title get you? It got us. Last week, my pair and I created a file while we were developing that was called "REALLYFUCKINGIMPORTANT". Inside this file we wrote one line of what we needed to do *this* week.
Title get you? It got us. Last week, my pair and I created a file while we were developing that was called "REALLYFUCKINGIMPORTANT". Inside this file we wrote one line of what we needed to do *this* week.
I gave my very first Pecha Kucha talk last night. It was a blast. You get to work with only 20 slides and 20 seconds per slide.
I was asked to do a quick review of a new CMS called Ansuz. It's available on Github and is being developed currently. A few quick things for those interested in using it:
On my new open-source project TwitterCompare I wanted to have a better way of receiving JSON data in my tests when using HTTParty.
get('/account/verify_credentials.json')
# spec/spec_helper
require 'fake_web'
require 'open-uri'
FakeWeb.register_uri('http://twitter.com:80/account/verify_credentials.json?', :response => '/testfiles/http_responses/verifiy.response.json.txt')You can pass :response a string that is a path to a file to return that file or you can have it return a string.
I've been using webby a lot lately. It's hot for static-like sites. The site that I've been really digging into Webby with is TheDailyRefactoring.com.
$ webby deployThis won't work until after you setup some constants though. In your "Sitefile" in the root of your webby-application, you need to set the user, host, and directory of where your site is going to be hosted.
I know that I'm not the only developer that sucks at graphic design. When I'm hacking on a project or attempting to actually finish something useful I always use a CSS website template while doing it from somewhere like Open-Source-Web-Design.org. I like things to look pretty. Even if it's in development.
Photoshop Tutorials: http://psdtuts.com/
Get a feel for what good design is by Allan Branch's Flickr stream of good designs he comes across: http://flickr.com/photos/ispypurdydesigns
I lied! I love it and it's totally helpful in the long-run.
Labels: rails testing rspec
When working with a team on a project things can get quickly out of sync. However, when working with a geographically seperated team, things can get out of sync before it even happens -- quick. With source control and high level languages of today, being disorganized amongst team members is much better than it was a few years ago, but still still happens just as much.
manufacturer = Manufacturer.new(:name => "Chevrolet")
manufacturer.models.build(:name => "Corvette")
manufacturer.models.build(:name => "S10")
manufacturer.save
Labels: activerecord, rails
Developing applications that utilize Paypal can be a bear. I've done it twice so far and for some odd reason Paypal likes to change things up frequently.
trunk/vendor/plugins/activemerchant-1.3.2/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb
URLS = {
:test => { :certificate => 'https://api.beta-sandbox.paypal.com/2.0/',
:signature => 'https://api-3t.beta-sandbox.paypal.com/2.0/' },
:live => { :certificate => 'https://api-aa.paypal.com/2.0/',
:signature => 'https://api-3t.paypal.com/2.0/' }
}
Goals are a bitch. Over the years of doing research on being more productive or achieving what you really want, I've found goals to be a very powerful force. When a goal is defined in writing, it's tangible. That's why I believe so many people don't achieve what they want these days. Everyone is either too busy to write the goals down or they don't know how. I love examples and they really express what is being taught through application. So to help everyone out, here are some real goals that I made for myself when I first started consulting last year:
Labels: productivity motivation
After bitching and complaining, I've put my almost-complete-capistrano-tasks on GitHub to start maintaining.
After going through all the correct setup steps to put your open-source project on RubyForge or GitHub you try to do a git-push and then receive errors when trying to git-push.
Labels: git commandline ssh
So you have a project in SVN. You create a few new files and decided you just want to delete them via the commandline real quick.
Labels: commandline trick
When hosting multiple Rails applications using the new mod_rails for Apache, all of the RAILS_ENV variables will default to 'production'.
Wow, this is HOT.
I wanted to add a column "content" to the user's table. Most of us run the following to create a migration:
script/generate migration addContentToUsers
class AddContentToUsers < ActiveRecord::Migration
def self.up
end
def self.down
end
end
class AddContentToUsers < ActiveRecord::Migration
def self.up
add_column :users, :content, :text
end
script/generate migration AddContentToUsers content:string
class AddContentToUsers < ActiveRecord::Migration
def self.up
add_column :users, :content, :string
end
def self.down
remove_column :users, :content
end
end
Labels: rails activerecord migrations
For some odd reason, I had to put double-quotes around the URL for the source in the following for the EngineYard gem that helps with deployment
Labels: gems
The Mechnical Turk from Argument from design wrote this sweet ass plugin. It cleans up your controllers, removes redundancy -- hot!
Labels: plugins
Today I had an epiphany while looking at the codebase of a COTS (commercial off-the-shelf). Don't' get me wrong, I'm all for leveraging someone else's blood, sweat, and tear's for one-low-price. This time was different. It is the shittiest code I've everseen in a product that was purchased.
Labels: php
I was attempting to deploy the latest changes to the server for the very first time on my machine and got a wonderful little message from capistrano telling me:
role :web, '42.69.187.666', :mongrel => true
role :app, '42.69.187.666', :mongrel => true
Tonight's RubyJax meeting rocked out! Getting everyone to pair up and work on something interesting was exciting. I myself was able to work with Russ, really nice guy that wanted to learn more about Rails to kick his ColdFUSION habit!
Here's the following scenario:
CREATE TABLE User
(
id INT,
title VARCHAR(42),
created_by INT,
assigned_to INT,
)
class User
has_many :assigned_tickets, :foreign_key => 'assigned_to', :class => 'Ticket'
has_many :created_tickets, :foreign_key => 'created_by', :class => 'Ticket'
end
u = User.find(:first)
render :partial => 'tickets/assigned_tickets', :collection => u.assigned_tickets
render :partial => 'tickets/created_tickets', :collection => u.created_tickets
Labels: rails activerecord
Had a bitch ass time getting NGinx + PHP5 + MySQL working on Fedora 8. There's very little documentation and what little documentation there is, is in Russian.
server {
listen 80;
server_name myspace.com;
access_log logs/myspace.access.log main;
location / {
root /sites/myspace.com;
index index.html index.php;
}
location ~ \.php$ {
fastcgi_param SCRIPT_FILENAME /sites/myspace.com/$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_pass 127.0.0.1:10004;
fastcgi_index index.php;
}
}
/usr/bin/spawn-fcgi -a 127.0.0.1 -p 10004 -u lighttpd -g lighttpd -f /opt/php/bin/php-cgi
Labels: php nginx mysql
A recent customer of mine had a small issue. His site was running on Linux utilizing Joomla. I realize how nice it is to use software right out of the box, but if the idea is to add ANY features, don't use Joomla.
I just released an open-source project that I did in RubyOnRails. I had a project that I needed to do that starts out very similar to a basic CRM so I figured why not put out a basic CRM before I get into anything specific for the project I'm working on.
Labels: ruby rails divergentcrm