Skip to content

Instantly share code, notes, and snippets.

View botverse's full-sized avatar
💭
🤙

Alfonso de la Osa botverse

💭
🤙
View GitHub Profile
npm install --save \
babel-core \
babel-loader \
babel-preset-es2015 \
babel-preset-stage-1 \
babel-plugin-transform-decorators-legacy \
babel-plugin-transform-h-jsx \
esutils \
mobx \
virtual-dom \
import { observable } from 'mobx';
import mount from './mount';
const state = { @observable n: 0 };
const onclick = () => state.n++;
const view = (state) => <div>
<h1>clicked {state.n} times</h1>
<button onclick={onclick}>click me!</button>
### Keybase proof
I hereby claim:
* I am botverse on github.
* I am fonz (https://keybase.io/fonz) on keybase.
* I have a public key whose fingerprint is 7C0B D8A0 7AC7 42B6 AD45 ED8E 248E DC81 4065 CF8F
To claim this, I am signing this object:
@botverse
botverse / Vim-cheatsheet.md
Last active August 29, 2015 14:16
Vim Cheat Sheet
#include <iostream>
#include <string>
#include <chrono>
#include <thread>
#include <cstdlib>
#include <sstream>
enum Color
{
NONE = 0,
@botverse
botverse / Huffman.hs
Created June 1, 2014 20:34
A very ineficient implementation of the Huffman algorithm
module Huffman(
Tree(..),
tree,
encode,
decode
) where
import Data.Ord
import Data.List (sortBy)
@botverse
botverse / Hello.cpp
Created August 30, 2013 13:51
Little step by step tutorial to use emscriptem
#include "Hello.h"
#include <iostream>
using namespace std;
void Hello::greeting()
{
if (formal)
cout << "Hello, nice to meet you!" << endl;
else
cout << "What's up?" << endl;
@botverse
botverse / eventstest.js
Created July 24, 2013 11:53
Test events inside a iframe with jquery
$(function(){
$("body").mousemove(function(event){
$("#console").html("parent: " + event.pageX + ", " + event.pageY);
});
var iframe = $("<iframe>").load(function(){
iframe.contents().mousemove(function(event){
var position = iframe.position();
$("#console").html("child : " + (event.pageX + position.left) + ", " + (event.pageY + position.top));
});