Skip to content

Instantly share code, notes, and snippets.

View pori's full-sized avatar
💃
Fabulous!

Alice Hernandez pori

💃
Fabulous!
View GitHub Profile

Keybase proof

I hereby claim:

  • I am pori on github.
  • I am pori (https://keybase.io/pori) on keybase.
  • I have a public key ASD_FZ34V6Vn4KpNzoJeDFMuwUlZiIumcxwng5IJhJ7w2Ao

To claim this, I am signing this object:

import EventEmitter from 'events';
export default class EventTarget extends EventEmitter {
addEventListener(type, cb, options = {}) {
this.on(type, cb);
}
removeEventListener(type, cb, options = {}) {
this.removeListener(type, cb);
import test from 'ava';
import EventTarget from '../build';
class Window extends EventTarget {}
test(t => {
const window = new Window();
const type = 'load';
const cb = (event) => t.pass();
{
"presets": ["es2015"],
"plugins": []
}
@pori
pori / 0_reuse_code.js
Created April 28, 2016 00:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@pori
pori / format.js
Created February 23, 2016 15:52
Format Mixpanel "content people_tab" list element from dashboard to grab raw keys. Useful for imports.
'use strict';
let list = document.getElementsByClassName('word_container');
let temp = document.getElementById('temp');
let res = Array.prototype.slice.call(list).map(el => `"${el.innerText}"`);
temp.innerHTML = res;
@pori
pori / gist:e7cb6cae31880bf41f38
Created December 5, 2015 23:20 — forked from afeld/gist:5704079
Using Rails+Bower on Heroku
@pori
pori / main.cpp
Created July 25, 2015 23:33
An example of object oriented concepts done in C++.
#include <iostream>
#include <string>
using std::string;
struct Coordinates {
float latitude;
float longitude;
};
@pori
pori / s3-example.js
Created March 22, 2015 20:49
An s3 example for Node.js
var fs = require('fs'),
AWS = require('aws-sdk'),
s3 = new AWS.S3();
var body = fs.createReadStream('./profile.jpeg');
var date = new Date();
var params = {
Bucket: 'rapidoapp',
Key: "avatar-" + date.getTime() + ".jpeg",
Body: body
};
@pori
pori / .vimrc
Last active August 29, 2015 14:16
A simple global Vim configuration for 2 space indents.
set nu
filetype plugin indent on
set tabstop=2
set shiftwidth=2
set expandtab
syntax on