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:
I hereby claim:
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": [] | |
} |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
'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; |
Updated for Rails 4.0.0+
Set up the bower
gem.
Follow the Bower instructions and list your dependencies in your bower.json
, e.g.
// bower.json
{
#include <iostream> | |
#include <string> | |
using std::string; | |
struct Coordinates { | |
float latitude; | |
float longitude; | |
}; |
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 | |
}; |
set nu | |
filetype plugin indent on | |
set tabstop=2 | |
set shiftwidth=2 | |
set expandtab | |
syntax on |