Skip to content

Instantly share code, notes, and snippets.

View hisapy's full-sized avatar
🏠
Working from home

Hisa hisapy

🏠
Working from home
View GitHub Profile
@robrichard
robrichard / react-relay.js
Created November 1, 2017 16:40
Mock for relay modern
import React from 'react';
import PropTypes from 'prop-types';
const relayMock = jest.genMockFromModule('react-relay');
const relayChildContextTypes = {
relay: PropTypes.object
};
const relayEnvironment = {
lookup: jest.fn()
@hisapy
hisapy / view_helpers.rb
Created July 25, 2015 17:08
Scoping in rspec view specs
##
# Inspired in:
# https://github.com/robinroestenburg/tamingthemindmonkey-sinatra/blob/master/posts/2011-11-07-capybara-matchers-and-scoping-in-view-specs.markdown
# and
# https://github.com/jnicklas/capybara/blob/d087965f8110f4098a11f52bb18edea88df277ac/lib/capybara/session.rb#L281
# I created my own nestable version of within() scope matcher
#
# Just put this in spec/support/view_helpers.rb
#
# Examples
@rubencaro
rubencaro / install_elixir.md
Last active September 30, 2023 03:58
Elixir installation guide

Elixir installation guide

Version numbers should be the ones you want. Here I do it with the last ones available at the moment of writing.

The simplest way to install elixir is using your package manager. Sadly, at the time of writing only Fedora shows the intention to keep its packages up to date. There you can simply sudo dnf install erlang elixir and you are good to go.

Anyway, if you intend to work with several versions of erlang or elixir at the same time, or you are tied to a specific version, you will need to compile it yourself. Then asdf is your best friend.