I hereby claim:
- I am ravinggenius on github.
- I am ravinggenius (https://keybase.io/ravinggenius) on keybase.
- I have a public key whose fingerprint is 71D5 A324 4D7D 3154 C739 DE3F EB95 0C85 C160 4EAB
To claim this, I am signing this object:
(function (global) { | |
global.awesomification = function (includeSpeech) { | |
var log = console.log; | |
console.log = function (str) { | |
var css = 'background: linear-gradient(to right, red, yellow, lime, aqua, blue, fuchsia, red); color: white; font-weight: bold; text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;'; | |
var args = Array.prototype.slice.call(arguments); | |
args[0] = '%c' + args[0]; | |
args.splice(1, 0, css); |
I hereby claim:
To claim this, I am signing this object:
From: /Users/simpsonj/products/usage_meter/app/models/price_book.rb @ line 3 : | |
1: class PriceBook | |
2: # include Anima.new(:id, :name, :codes) | |
=> 3: binding.pry | |
4: | |
5: def price_for_code(code) | |
6: codes[code] | |
7: end |
!!! I HAVEN'T RUN THIS CODE !!!
Refactor of Caleb Wood's module approach to static lists in Rails to extract StaticList from Greeting.
When rendering tags |> join(', ')
, join(', ')
would be evaluated first. Next the tags
would be passed into whatever join(', ')
returns, which is expected to be a function that excepts a single argument.
Essentially this gets transformed (logically at least) into join(', ')(tags)
, which is equivalent to join(', ', tags)
.
## | |
# Constants | |
System.Math.i # square root of -1 | |
System.Math.PI # 5 decimal points (same as `System.Math.PI_to(5)`, but only calculated once) | |
System.Math.PI_to # lambda that calculates a decimal to `n` decimal points | |
## | |
# Real Numbers |
$ ./bin/rip repl | |
Welcome to Rip | |
Type "help" for help, "exit" to quit | |
[1] module> add = -> (a, b) { a + b } | |
=> #< #< System.Lambda > [ bind, class ] keyword = ->, arity = 2 > | |
[2] module> add5 = add(5) | |
=> #< #< System.Lambda > [ bind, class ] keyword = ->, arity = 1 > |
module StepHelpers | |
def table_for(table_or_id) | |
if table_or_id.is_a?(Capybara::Node::Element) | |
table_or_id | |
else | |
find("##{table_or_id}") | |
end | |
end | |
def row_containing_text(table_or_id, text) |
var gulp = require('gulp'); | |
var clean = require('gulp-clean'); | |
var replace = require('gulp-replace'); | |
var zip = require('gulp-zip'); | |
var jshint = require('gulp-jshint'); | |
var stylish = require('jshint-stylish'); |
# comment | |
_true = true | |
_false = false | |
integer = 42 | |
rational = 3.14 | |
rational = 2 / 3 | |
complex = integer + decimal.i |