Skip to content

Instantly share code, notes, and snippets.

View your's full-sized avatar
🐭

Giuseppe Lobraico your

🐭
View GitHub Profile
@your
your / async-await.js
Created May 12, 2019 00:27 — forked from wesbos/async-await.js
Simple Async/Await Example
// 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works
const axios = require('axios'); // promised based requests - like fetch()
function getCoffee() {
return new Promise(resolve => {
setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee
});
}
#!/bin/bash
# Docker cleanup utility.
# Stop all containers
docker kill $(docker ps -q)
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
@your
your / rspec_tests_bisection.md
Created July 21, 2016 16:37
RSpec tests bisection

To solve random tests failures, you can use the use the --bisect argument when running rspec.

A second argument --seed N is required to correctly bisect the tests.

Instructions

Take note of the seed number used in the latest failing test and run:

bundle exec rspec spec --seed SEED_NUMBER --bisect

Example result: