Just install this in your apps like so:
gem 'test-spec-mini', :git => 'git://gist.github.com/1806986.git', :require => 'mini'
# Copyright (c) 2010, Nathaniel Ritmeyer. All rights reserved. | |
# | |
# http://www.natontesting.com | |
# | |
# Save this in a file called 'unused.rb' in your 'features/support' directory. Then, to list | |
# all the unused steps in your project, run the following command: | |
# | |
# cucumber -d -f Cucumber::Formatter::Unused | |
# | |
# or... |
#!/usr/bin/env ruby | |
@file_count = 0 | |
@skip_count = 0 | |
@line_count = 0 | |
def unshift_encoding(path) | |
lines = File.open(path).readlines | |
if lines.first =~ /encoding: utf-8/ |
Just install this in your apps like so:
gem 'test-spec-mini', :git => 'git://gist.github.com/1806986.git', :require => 'mini'
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.
Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.
Below is a collection of my favourite responses I gathered from Guardian engineers when asked the question: What have you learnt starting from scratch and building a mobile-first next generation web platform for the Guardian?
#Count the lines of Ruby code in your app | |
find . -iname "*.rb" -type f -exec cat {} \; | wc -l |
/* bling.js */ | |
window.$ = document.querySelectorAll.bind(document); | |
Node.prototype.on = window.on = function (name, fn) { | |
this.addEventListener(name, fn); | |
}; | |
NodeList.prototype.__proto__ = Array.prototype; |