Skip to content

Instantly share code, notes, and snippets.

View Xhamps's full-sized avatar
:octocat:
Learning

Raphael Araujo Xhamps

:octocat:
Learning
View GitHub Profile
const units:{ [key: number]: String } = {
0: 'zero',
1: 'um',
2: 'dois',
3: 'três',
4: 'quatro',
5: 'cinco',
6: 'seis',
7: 'sete',
8: 'oito',
0 info it worked if it ends with ok
1 verbose cli [ '/Users/xhamps/.nvm/versions/node/v8.11.2/bin/node',
1 verbose cli '/Users/xhamps/.nvm/versions/node/v8.11.2/bin/npm',
1 verbose cli 'i',
1 verbose cli 'protobufjs' ]
2 info using npm@6.1.0
3 info using node@v8.11.2
4 verbose npm-session e59311af7f2e3f25
5 silly install loadCurrentTree
6 silly install readLocalPackageData
// Based off https://en.wikipedia.org/wiki/Levenshtein_distance
// No optimization, really.
function levenshtein(a, b) {
/* base case: empty strings */
if (a.length == 0) {
return b.length;
}
if (b.length == 0) {
return a.length;
}
@Xhamps
Xhamps / phoenix showdown rackspace onmetal io.md
Created November 20, 2017 11:32 — forked from omnibs/phoenix showdown rackspace onmetal io.md
Phoenix Showdown Comparative Benchmarks @ Rackspace

Comparative Benchmark Numbers @ Rackspace

I've taken the benchmarks from Matthew Rothenberg's phoenix-showdown, updated Phoenix to 0.13.1 and ran the tests on the most powerful machines available at Rackspace.

Results

Framework Throughput (req/s) Latency (ms) Consistency (σ ms)
const j = {a: 1, b: 2, c: { d: 2}, e: { f: { g: 10} } };
function xhamps(obj) {
const creatNewObj = (obj) => {
return Object.keys(obj).reduce((r, key) => {
r[key] = (typeof obj[key] === 'object')? creatNewObj(obj[key]) : obj[key];
return r;
},{});
};
Verifying that "raphaelaraujo.id" is my Blockstack ID. https://onename.com/raphaelaraujo
var path = require("path");
var gulp = require("gulp");
var config = require("../project.config");
var runSequence = require('run-sequence');
gulp.task("default", false, () => {
gulp.tasks.help.fn();
});
gulp.task("build", "Copy assets, build CSS and JS.", ["clean"], (cb) => {
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
@Xhamps
Xhamps / README-Template.md
Created November 19, 2016 14:55 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@Xhamps
Xhamps / tmux-cheatsheet.markdown
Created September 8, 2016 02:57 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname