How do you compare date/times in RSpec?
If you do this
expect(Time.now.to_i).to eq Time.new(2014, 4, 2).to_i
Array values in the parameter to `Gem.paths=` are deprecated. | |
Please use a String or nil. | |
An Array (...) was passed in from bin/rails:3:in `load' | |
Solution | |
======== | |
https://github.com/rubygems/rubygems/issues/1551 | |
If you came to this issue by googling the error specified in the description of this issue, you should know that it has already been fixed in spring-1.6.4 and all you need to do is to update to latest spring and regenerate binstubs, like this: |
This guide assumes that you recently run brew upgrade postgresql
and discovered to your dismay that you accidentally bumped from one major version to another: say 9.3.x to 9.4.x. Yes, that is a major version bump in PG land.
First let's check something.
brew info postgresql
The top of what gets printed as a result is the most important:
A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.
As it turns out, there are several open-source tools that allow for conversion between file types. Pandoc is one of them, and it's powerful. In fact, pandoc's website says "If you need to convert files from one markup format into another, pandoc is your swiss-army knife." But, although pandoc can convert from markdown into .docx, it doesn't work in the other direction.
<? | |
///////////////////// | |
// slack2html | |
// by @levelsio | |
///////////////////// | |
// | |
///////////////////// | |
// WHAT DOES THIS DO? | |
///////////////////// | |
// |
Someone recently asked the following question in the discussion forum of the Rubyists LinkedIn group: What separates a junior Rails developer from a senior one? | |
My response follows. Join us at http://www.linkedin.com/groups?gid=120725 to weigh in on this and other topics of interest to Rubyists. As of today there are almost 1,200 members, including numerous movers and shakers in the Ruby and Rails communities. | |
“Distinguishing between junior and senior people in the Rails world is not so different from making the distinction in other web development environments. | |
“Junior Rails people have not dealt with scaling issues to the degree that senior people have. Getting a public-facing Rails application to perform under significant stress is more challenging than doing the same with other building materials such as PHP. Senior people know how to performance-test Rails applications, where to look for bottlenecks, and how to eliminate them one after another until performance is acceptable in real conditions. The Ra |
class Player | |
def play_turn(warrior) | |
if warrior.feel.enemy? | |
warrior.attack! | |
else | |
if warrior.health < 20 && !taking_damage?(warrior) | |
warrior.rest! | |
else | |
warrior.walk! | |
end |
# place this file in ~/.config/terminator/config | |
[global_config] | |
title_transmit_bg_color = "#d30102" | |
focus = system | |
[keybindings] | |
reset_clear = <Ctrl>R | |
new_tab = <Ctrl>T | |
split_horiz = <Ctrl><Shift>E | |
split_vert = <Ctrl>E | |
close_term = <Ctrl><Shift>W |