Skip to content

Instantly share code, notes, and snippets.

Eric Farkas speric

Block or report user

Report or block speric

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

I highly suspect that the RSpec core team all use black backgrounds in their terminals because sometimes the colors aren’t so nice on my white terminal

I certainly use a black background. I'm not sure about the other RSpec core folks. Regardless, if there are some color changes we can make that would make output look good on a larger variety of backgrounds, we'll certainly consider that (do you have some suggested changes?). In the meantime, the colors are configurable, so you can change the colors to fit your preferences on your machine. First, create a file at

speric /
Last active Dec 8, 2017
Use .test domain locally with pow
speric /
Created Oct 14, 2016 — forked from JunichiIto/
List of alias matchers in RSpec 3

This list is based on aliases_spec.rb.

You can see also Module: RSpec::Matchers API.

matcher aliased to description
a_truthy_value be_truthy a truthy value
a_falsey_value be_falsey a falsey value
be_falsy be_falsey be falsy
a_falsy_value be_falsey a falsy value
speric /
Last active Mar 4, 2016
Histogram Solution


defmodule HistogramCup do
  @moduledoc """
  You are given an input list whose each element represents the height of a line towers.
  The width of every tower is 1. It starts raining. How much water is collected between the towers?

  Input: [1,5,3,7,2] , Output: 2 units
  Explanation: 2 units of water collected between towers of height 5 and 7
speric /
Last active Dec 10, 2016
Introducing Phoenix: Concurrent

An excerpt from Programming Phoenix by Chris McCord, Bruce Tate, and José Valim

You won’t find a "PhoenixDelayedJob" or "ElixirResque", those complex packages that exist only to spin off reliable processes as a separate web task.

You don’t need one. Don’t get us wrong. In Ruby, those packages are well-conceived and a critical part of any well-crafted solution. In Elixir, those frameworks turn into primitives. The Elixir programming model makes reasoning about concurrent systems almost as easy as reasoning about single threaded ones. When you have two database fetches, you won’t have to artificially batch them together with a stored procedure or a complex query. You can just let them work at the same time, like this:

company_task  = Task.async(fn -> find_company(cid) end)
speric /
Last active Aug 29, 2015
Summon the Ender Dragon, and ride it with a minecart

/summon Minecart ~ ~1 ~ {Riding:{id:EnderDragon}}

speric /
Last active Aug 29, 2015 differences depending on mm dd yyyy separator character
# Rails 3.2.21, ruby 2.0.0p353

# 'American' style
>"11/12/2012 10:10")
=> Mon, 12 Nov 2012 10:10:00 EST -05:00

# 'Rest of the world' style
>"11-12-2012 10:10")
=> Tue, 11 Dec 2012 10:10:00 EST -05:00
speric / trackback.php
Last active Aug 29, 2015
Ping WordPress trackback URLs
View trackback.php
<title>SD News Pinger</title>
body{ font-family: Arial, sans-serif; font-size: 12px; }
speric /
Last active Aug 29, 2015
Gift Ideas For Young Engineers
  • Leatherman for young'ins ($54) Comes with the knife blade detached which can be added when 'earned:'
  • Weather Lab ($15) This is more science oriented. Science can be boring at times, but carefully noting numbers and charting phenomenon to find correlation is a concept all should understand.
  • Robo Link A ($25) Kit that builds five robot variations. It's not an intelligent (interactive) robot. It's mean to learn bout gears (mechanical engineering).
  • Lego Mindstorms EV3 ($350) Ultimate lego kit, comes with motors, sensors and programmable controller which allows you to write programs and built ultimately anything (robots, machines, etc.). You can use their graphical programming language or venture out into RobotC, which is C-based. Make serious robots without electronics to get in the way.
  • **Flexbot

Keybase proof

I hereby claim:

  • I am speric on github.
  • I am speric ( on keybase.
  • I have a public key whose fingerprint is 17C2 5F10 32BF FAF5 AF67 880A FFB0 589B 47F6 E4BC

To claim this, I am signing this object:

You can’t perform that action at this time.