Skip to content

Instantly share code, notes, and snippets.


Chris Irish supairish

Block or report user

Report or block supairish

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
View gist:ddaa7db8d67b669473ade9dc66cc5515
### Keybase proof
I hereby claim:
* I am supairish on github.
* I am supairish ( on keybase.
* I have a public key ASBs78D4qoRMMf3LvyFEPFkMcIjjJfa72T86ts8sMRZIRwo
To claim this, I am signing this object:
View test_stripe.rb
require 'bundler/inline'
gemfile do
source ''
gem 'selenium-webdriver', '3.142.3'
gem 'webdrivers'
gem 'capybara', '3.28.0'
gem 'byebug'

1. Get your IP Address

echo `ifconfig $(netstat -nr | grep -e default -e "^0\.0\.0\.0" | head -1 | awk '{print $NF}') | grep -e "inet " | sed -e 's/.*inet //' -e 's/ .*//' -e 's/.*\://'`

2. Modify your hosts file


supairish / capybara.rb
Created Feb 23, 2019 — forked from guzart/capybara.rb
Capybara configuration to run a webpack dev server for e2e testing
View capybara.rb
# spec/support/capybara.rb
require 'capybara/rails'
require 'capybara/rspec'
# port and url to webpack server
WEB_TEST_PORT = '5005'.freeze
WEB_TEST_URL = "http://localhost:#{WEB_TEST_PORT}".freeze
def capybara_wait_for_webpack_server
10.times.each do |_|
supairish / Integrate Gem Engine and main Rails app
Last active Mar 21, 2019 — forked from maxivak/
Integrating Gem/Engine and Main Rails App
View Integrate Gem Engine and main Rails app
# Integrate Gem/Engine and main Rails app
## Overview
- [Paths](#paths)
- [Routes](#routes)
- [Add functionality to controller](#controllers)
- [Improving (Extending or overriding) Engine functionality](#extend-engine-class)
- [Helpers](#helpers)
- [Assets](#assets)
supairish / echo.rb
Created Feb 6, 2019 — forked from dtchepak/echo.rb
Simple Ruby HTTP server to echo whatever GET or POST requests come through. Largely based on
View echo.rb
# Reference:
require 'webrick'
class Echo < WEBrick::HTTPServlet::AbstractServlet
def do_GET(request, response)
puts request
response.status = 200
def do_POST(request, response)
puts request
supairish /
Created Feb 5, 2019 — forked from wbotelhos/
Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib (LoadError)
ln -s /usr/local/opt/readline/lib/libreadline.7.0.dylib /usr/local/opt/readline/lib/libreadline.6.dylib
supairish /
Created Feb 1, 2019 — forked from ibraheem4/
Installing Postgres via Brew (OSX)

Installing Postgres via Brew


Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
supairish / .bash_prompt
Created Jan 15, 2019 — forked from shmatov/.bash_prompt
Bash prompt with rvm, nvm, virtualenv and git integration.
View .bash_prompt
function __git_dirty {
git diff --quiet HEAD &>/dev/null
[ $? == 1 ] && echo " ↺ "
function __git_branch {
__git_ps1 "%s"
function __my_rvm_ruby_version {
supairish / example_activejob.rb
Created Sep 27, 2018 — forked from ChuckJHardy/example_activejob.rb
Example ActiveJob with RSpec Tests
View example_activejob.rb
class MyJob < ActiveJob::Base
queue_as :urgent
rescue_from(NoResultsError) do
retry_job wait: 5.minutes, queue: :default
def perform(*args)*args)
You can’t perform that action at this time.