Skip to content

Instantly share code, notes, and snippets.

View wojtekmach's full-sized avatar

Wojtek Mach wojtekmach

View GitHub Profile
@wojtekmach
wojtekmach / inetrc
Created October 8, 2020 20:03 — forked from nirev/inetrc
Configuring Erlang inet
%% -- ERLANG INET CONFIGURATION FILE --
%% https://erlang.org/doc/apps/erts/inet_cfg.html
%% use it by setting the following envvar:
%% export ERL_INETRC="/path/to/this-file"
%%
%% read and monitor nameserver config from here
{resolv_conf, "/etc/resolv.conf"}.
%% increase cache size
{cache_size, 2000}.
%% specify lookup method
@wojtekmach
wojtekmach / README.rst
Last active August 29, 2015 14:07 — forked from mmerickel/README.rst

How to setup docker on OS X using boot2docker

Basic install

  1. Install Virtualbox
  2. Install XCode and the Command Line Tools
## Docker file of shingara/chruby container
FROM base
MAINTAINER Cyril Mougel "cyril.mougel@gmail.com"
RUN apt-get update
RUN apt-get install -q -y wget
RUN apt-get install -q -y ca-certificates
RUN apt-get install -q -y make
require 'meatloaf'
require 'steps'
Feature "Eat candies" do
Scenario "Eat a candy from a jar full of them" do
Given "I have a jar with candies", candies: 10
When "I eat one candy"
Then "the jar won't be empty"
end
@wojtekmach
wojtekmach / contain_within_matcher.rb
Created May 25, 2011 22:09 — forked from mattsnyder/contain_within_matcher.rb
Contain Within Matcher for use in your view specs. Faster than css_select and assert_select.
# Must have Nokogiri gem installed and save this file in your spec/support dir
# Allows you to write cleaner/faster specs in your views (50% faster than css_select)
# Increased readability in your spec doc
# ex.
# rendered.should contain('my heading').within('h1') # searches all H1 tags for 'my heading'
# or
# rendered.should contain('my string') # searches entire rendered string for 'my string'
class Within
def initialize(expected, css_selector)
@expected = expected