Skip to content

Instantly share code, notes, and snippets.

View rianby64's full-sized avatar
🐋
Let's GO

Andres Rios rianby64

🐋
Let's GO
View GitHub Profile
Feature: Refund item
Scenario: Jeff returns a faulty microwave
Given Jeff has bought a microwave for $100
And he has a receipt
When he returns the microwave
Then Jeff should be refunded $100
'use strict';
loadFeature('features/simpleStory.feature');
feature('Refund item', function() {
scenario(/(\w+) returns a faulty microwave/, function(user) {
given(/(\w+) has bought a microwave for \$(\d+)/, function(client, summa) {
});
and('he has a receipt', function() {
@rianby64
rianby64 / apolog.js
Last active January 14, 2016 19:34
Apolog loader for Jasmine
'use strict'
var apolog = require('apolog'),
fs = require('fs'),
_loadFeature = apolog.loadFeature;
global.feature = apolog.feature;
global.scenario = apolog.scenario;
global.background = apolog.background;
global.given = apolog.given;
global.when = apolog.when;
@rianby64
rianby64 / package.json
Last active January 18, 2016 11:46
A package.json example for Apolog
{
"name": "example",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "jasmine"
},
"license": "ISC",
"devDependencies": {
@rianby64
rianby64 / .gitconfig
Last active April 3, 2016 16:10
My gitconfig
[user]
name = Andres Rios
email = [email protected]
[push]
default = matching
[core]
editor = vim
[color]
ui = true
[alias]
'use strict';
window.feature = apolog.feature;
window.scenario = apolog.scenario;
window.step = apolog.step;
window.given = apolog.given;
window.when = apolog.when;
window.then = apolog.then;
window.but = apolog.but;
window.and = apolog.and;
@rianby64
rianby64 / .bashrc
Created April 3, 2016 16:07
My Bash RC
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
alias nave='~/.nave/nave.sh'
alias nstable='nave use stable'
@rianby64
rianby64 / .vimrc
Last active December 7, 2016 06:29
My Vim RC
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'airblade/vim-gitgutter'
Plugin 'othree/yajs.vim'
Plugin 'othree/html5.vim'
@rianby64
rianby64 / select-region.html
Created September 30, 2016 10:59
An example about how to draw a region by using mouse gestures
<!doctype html>
<html>
<head>
<style>
.fullwindow {
position: absolute;
height: 100%;
width: 100%;
top: 0px;
left: 0px;
@rianby64
rianby64 / windowError.html
Created October 7, 2016 12:54
A simple demo that shows how to catch all errors through the window.onerror (via addEventListener)
<!doctype html>
<html>
<body>
<button>Fire error</button>
<script>
'use script';
window.addEventListener('error', e => {
console.error('catch error', e);
});