✓
=> YOU MUST FOLLOW THIS RULE.
✗
=> YOU MUST NEVER, EVER DO THIS.
✓ — Variable names should NEVER be acronims.
package postgres | |
import ( | |
"database/sql" | |
"database/sql/driver" | |
"fmt" | |
"github.com/lib/pq" | |
"strings" | |
) |
if Rails.env.staging? | |
FailtaleReporter.enabled = false | |
end |
description = file.description.clone | |
@glossary.each do |w| | |
terms = w.name.split(',') | |
terms.each do |term| | |
term = Regexp.escape(term.strip).gsub('\ ', '\s+') | |
description.gsub!(/(\b#{term}\b)/i, "<acronym rel=\"#{w.id}\">\\1</acronym>") | |
end | |
end |
SCM_THEME_PROMPT_PREFIX="" | |
SCM_THEME_PROMPT_SUFFIX="" | |
RVM_THEME_PROMPT_PREFIX="[" | |
RVM_THEME_PROMPT_SUFFIX="]" | |
SCM_THEME_PROMPT_DIRTY=' ${bold_red}✗${normal}' | |
SCM_THEME_PROMPT_CLEAN=' ${bold_green}✓${normal}' | |
SCM_GIT_CHAR='${bold_green}±${normal}' | |
SCM_SVN_CHAR='${bold_cyan}⑆${normal}' |
(in /Users/Simon/Projects/json_select/t) | |
FF | |
Failures: | |
1) Parser should not swallow the first object after parsing a number(integer) | |
Failure/Error: ] | |
expected: ["foo", "bar", 42, "baz", "bax"] | |
got: ["foo", "bar", 42, "bax"] (using ==) | |
Diff: |
class A | |
def foo | |
puts "bar #{self.class}" | |
end | |
end | |
class B < A | |
def foo | |
puts "baz #{self.class}" | |
end |
/* | |
* Curry a JS function. | |
* | |
* Note: | |
* Curry doesn't change `this`. | |
* | |
* Example: | |
* function f(a, b, c){ | |
* return [a, b, c]; | |
* }; |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
<script src="http://simonmenke.me/chains.js/build/jquery.stacks.min.js" type="text/javascript" charset="utf-8"></script> | |
<script type="text/javascript" charset="utf-8"> | |
(function(exports){ | |
exports.state_machine = function(def){ | |
(function($){ | |
$.fn.viewportState = (function(){ | |
var results = []; | |
this.each(function(){ | |
var bounds = this.getBoundingClientRect(); | |
if (window.viewport.height() < bounds.top) { | |
results.push(['below', $(this)]); | |
} else if (bounds.bottom <= 0) { | |
results.push(['above', $(this)]); | |
} else { |