Instantly share code, notes, and snippets.

View main.go
package main
import (
"errors"
"fmt"
"log"
"math/rand"
"net/http"
)
View main.go
package main
import (
"log"
"net/http"
)
type handlers struct{}
func (h *handlers) Middleware(next http.HandlerFunc) http.HandlerFunc {
View state.js
let createContext = function(firstState) {
let context = {
count: 100,
next: firstState,
};
return function(message) {
context = context.next(message, context);
return context;
};
};
View pyenv_pipenv.md
View main.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
import logging
import time
from jaeger_client import Config
from opentracing.propagation import Format
if __name__ == "__main__":
log_level = logging.DEBUG
logging.getLogger('').handlers = []
View README.md

Solar System distances from Earth in light-minute

object minutes
Sun 8.3
Mercury 5.1
Venus 2.3
Mars 4.4
Jupiter 35.0
Saturn 70.9
View coherence_0_3.txt
Add :coherence to your applications list in mix.exs.
def application do
[mod: {Chatourius, []},
applications: [..., :coherence]]
end
Add the following to your router.ex file.
defmodule Chatourius.Router do
View attrToJson.vim
" usage:
" :AttrToJson
fun! AttrToJson()
execute '%s:\t: :'
execute '%s:;:,:'
execute '%s: =:\::'
execute '%s:\([A-z]\+\) {:\1\: {:'
execute '%s:\([A-z]\+\)\::"\1"\::'
execute '%s:,\(\n\s*\)}:\1},:'
execute '%s:},\(\n\s*\)}:}\1}:'
View 20170511_hello_nodejs.md

class: center, middle

Hello nodejs

Algunos ejemplos de nodejs

Juan Pablo Abarzúa

2017 05 11