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
***lib/tasks/metrics*** | |
begin | |
require 'metric_fu' | |
MetricFu::Configuration.run do |config| | |
config.metrics = [:flog] | |
config.flog = { :dirs_to_flog => ['app'] } | |
end | |
rescue LoadError | |
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
This is a project for tracking myself. The things I should do, don't do, wish I did, etc. | |
"Bugs" are things that I don't like that I aim to change. They can be given by anyone at "failin.gs" email, or submitted in person. (nailbiting and the like) | |
"Chores" are things that I need to do that don't add business value directly. (unimportant meetings, cleaning the gutters) | |
"Features" are things that do add business value, ie. things that I enjoy, improve my skills, and benefit my relationships with others. | |
There are two complications to using this project management system for this that I can predict now: |
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
Interesting... | |
~ $ irb | |
irb(main):001:0> test | |
ArgumentError: wrong number of arguments | |
from (irb):1:in `test' | |
from (irb):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
For some reason, neither of the following get the behavior I expected: | |
FileUtils.cp_r 'src/*', 'dest' | |
`cp -r src/* dest` | |
I need a period, not an asterisk. | |
From the docs: | |
FileUtils.cp_r 'src/.', 'dest' | |
# cp_r('src', 'dest') makes src/dest, but this doesn't. |
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
matching last comma in a string with negative lookahead | |
,(?!.*,) |
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
From total DNS control on godaddy. | |
3 A Records | |
Host- @ | |
IPs- http://docs.heroku.com/custom-domains | |
CName | |
Host- www | |
Points to- proxy.heroku.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
WTF | |
Spec::Mocks::MockExpectationError in 'SchemesController when I successfully POST 'create should create the scheme' | |
<TweetScheme(id: integer, user_id: integer, title: string, description: string, type: string, random_interval: boolean, frequency: integer, tweet_prompt: string, tweet_prompt_relationship: string, prompt: string, target: string, target_relationship: string, created_at: datetime, updated_at: datetime) (class)> received :new with unexpected arguments | |
expected: ([{"title"=>"scheme", "type"=>"TweetScheme", "description"=>"this is a scheme"}]) | |
got: ([{"title"=>"scheme", "type"=>"TweetScheme", "description"=>"this is a scheme"}]) |
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
Remember to set the parent model with all the attributes. There is no table for the sub models. | |
Ugh part one. From | |
http://code.alexreisner.com/articles/single-table-inheritance-in-rails.html | |
Overwrite the child models' model_name method: | |
def self.model_name | |
name = "vehical" | |
name.instance_eval do | |
def plural; pluralize; 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
request.request_uri | |
controller.controller_name | |
controller.action_name |
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
When I can't figure it out, for too long, it's usually one of these things. | |
Forget to include a file | |
Forget to load a library | |
Forget to call the executed code | |
Compare with "=" instead of "==" | |
Misspell variable names | |
Misspell method names | |
Forget to migrate | |
Call the wrong database |