First diagnose which version of libxml2 you're using:
bundle exec nokogiri -v
If you have 2.7.3 listed somewhere, you're in bad waters (known to segfault). Install this:
brew update
brew install libxml2
brew install libxslt
class AClassicPattern < ActiveRecord::Migration | |
def self.up | |
begin | |
try | |
rescue | |
raise ObiWan, "You're my only hope." | |
end | |
end |
First diagnose which version of libxml2 you're using:
bundle exec nokogiri -v
If you have 2.7.3 listed somewhere, you're in bad waters (known to segfault). Install this:
brew update
brew install libxml2
brew install libxslt
#!/usr/bin/env ruby | |
class Hero | |
attr_reader :name, :provenance, :hit_points | |
def initialize(name, prov, occupation_role, init_hit_points=nil) | |
@name = name | |
@provenance = prov | |
@occupation_role = occupation_role | |
@hit_points = init_hit_points || 1; |
# Mocking a class method | |
product = Product.new | |
Product.expects(:find).with(1).returns(product) | |
assert_equal product, Product.find(1) | |
# Mocking an instance method on a real object | |
product = Product.new | |
product.expects(:save).returns(true) | |
assert product.save |
# My Thoughts on Greppability | |
# | |
# The code certainly *seems* greppable but let me stress the greppability a bit.... ;) | |
# | |
# ➜ 7390184 git:(master) ✗ ack put http.rb | |
# :put, | |
# | |
# Comment #1 | |
# ========== | |
# |
A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.
I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.
I'd love comments and suggestions about any of these.
I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.
I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".
layout | title | description | tags | ||
---|---|---|---|---|---|
default |
SQL Style Guide |
A guide to writing clean, clear, and consistent SQL. |
|
// This will open up a prompt for text to send to a console session on digital ocean | |
// Useful for long passwords | |
(function () { | |
var t = prompt("Enter text to be sent to console, (This wont send the enter keystroke)").split(""); | |
function f() { | |
var character = t.shift(); | |
var i=[]; | |
var code = character.charCodeAt(); | |
var needs_shift = "!@#$%^&*()_+{}:\"<>?~|".indexOf(character) !== -1 |
{ "@context": { | |
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", | |
"rdfs": "http://www.w3.org/2000/01/rdf-schema#", | |
"owl": "http://www.w3.org/2002/07/owl#", | |
"express": "http://example.com/express#", | |
"defines": { | |
"@reverse": "rdfs:isDefinedBy" | |
}, | |
"propertyOf": { | |
"@id": "rdfs:domain", |
--- ----------------- ---- | |
Map Quick Explanation Link | |
--- ----------------- ---- | |
< <F1> Causes Netrw to issue help | |
<cr> Netrw will enter the directory or read the file |netrw-cr| | |
<del> Netrw will attempt to remove the file/directory |netrw-del| | |
<c-h> Edit file hiding list |netrw-ctrl-h| | |
<c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l| | |
<c-r> Browse using a gvim server |netrw-ctrl-r| | |
<c-tab> Shrink/expand a netrw/explore window |netrw-c-tab| |