Rails environment, using rspec: spit out objects and things to the console with puts
it 'checking a thing' do
puts activity # where activity is the name of an object
puts activity.class
# etc
I'd like to share some git aliases that you might find useful if you handle pull requests from others.
Add these to your ~/.gitconfig in the [alias] section:
copr = "!f() { git fetch -fu origin refs/pull/$1/head:pr-$1; git checkout pr-$1; } ; f"
prunepr = "!git for-each-ref refs/heads/pr-* --format='%(refname:short)' | while read ref ; do git branch -D $ref ; done"
Now you can "git copr #{pr_number}" (check out pull request is the mnemonic) and it will pull down the PR in a local branch of pr-#{pr_number} and check it out for you. To do it right, you must pronounce it "Copper" with a James Cagney gangster accent.
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository | |
$ git ls-files | xargs wc -l |
Every couple of weeks, I hear someone complaining about some difficulties with Bundler. Yesterday, it happened twice. But somehow I just never have those difficulties. I'm not saying Bundler is perfect; certainly in its early days it wasn't even close. But for the past two years it's been incredibly solid and trouble-free for me, and I think a large part of the reason is the way I use it. Bundler arguably does too much, and just as with Git, a big part of it is knowing what not to do, and configuring things to avoid the trouble spots.
For as long as we've been a team, we've tried hard to work with a set of guiding principles. These are not hard and fast rules, but rather a set of informal maxims that help us to make decisions, prioritize our work, and generally ship a ton of quality code. We're here to work hard, have fun, and make our customers happy, and we feel that these principles can help us make that happen.
We work in an ever changing system. Yesterday's awesome work is today's legacy code. Complaining that a piece of code or system doesn't work or isn't correct will not fix it. We are all responsible for this "bad" code which means we're also responsible for making it better.
/* ------------------------------------------------- | |
MINIMAL TWITTER FOR FLUID / USERSTYLES | |
Special thanks to: | |
Max Fenton (@maxfenton) for kicking this off | |
------------------------------------------------- */ | |
.trends, .bird-topbar-etched, .wtf-module, .site-footer, .topics { |
Chances are your head's spinning right now. That accusation of bias caught you off guard, you got kind of defensive, and now all hell has broken loose. You're feeling attacked on all sides. You're a good person at heart, and having all these people treat you like the antichrist is pretty upsetting.
You need to say something, but you're probably not in the best headspace to write copy right now. So to help you along, here's my 100% guaranteed-or-you-money-back scandal defusement apology template: