Skip to content

Instantly share code, notes, and snippets.

View maroshii's full-sized avatar

Francisco Miranda maroshii

View GitHub Profile
@maroshii
maroshii / bb.view.extend.js
Last active August 29, 2015 14:05
Remove a Backbone view and make it listen/trigger events
/*
Make views listen and trigger events.
We wrap it under `ev` to avoid name conflicts.
Eg:
myView.ev.trigger('update');
myView.ev.on('update',function(){
console.log('view updated');
})
*/

Mac from scratch

Install Software

Install from App Store

Install from Third-Party Websites

@maroshii
maroshii / index.js
Created July 25, 2017 21:11
Docker Proxy
const path = require('path');
const express = require('express');
const proxy = require('http-proxy-middleware');
const app = express();
app.use('/version', proxy({
target: {
socketPath: '/var/run/docker.sock',
}
}));
@maroshii
maroshii / sdktor_v1.5.x.js
Last active July 31, 2017 20:08
Sdktor flow type
declare module 'sdktor' {
declare export type Response<T> = { body: T, status: number };
declare export type AsyncResponse<T> = Promise<Response<T>>;
declare type BeforeSend = (reqConfig: {|
path: string,
params: Object,
headers: Object,
|}) => {|
@maroshii
maroshii / e2e.Makefile
Last active September 21, 2017 22:13
Runs a full selenium matrix and run tests with nightwatch. Browsers: chrome, firefox
SELENIUM_VERSION?=3.5.3
LAUNCH_URL?=https://google.com
.PHONY: default
default:
@$(MAKE) run; OK=$$?; $(MAKE) clean; exit $$OK
.PHONY: build-test-image
build-test-image:
@maroshii
maroshii / machine.js
Last active April 5, 2020 21:25
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions