Skip to content

Instantly share code, notes, and snippets.

View ealipio's full-sized avatar
:bowtie:
:)

Eisson ealipio

:bowtie:
:)
View GitHub Profile
package main
import (
"fmt"
)
func main() {
// using the value semantic for of the range
friends := []string{"Annie", "Betty", "Charley", "Doug", "Edward"}
for _, v := range friends {
package main
import (
"fmt"
)
func main() {
fruits := make([]string, 5, 8)
fruits[0] = "plum"
fruits[1] = "apple"
@ealipio
ealipio / cloudSettings
Last active October 15, 2018 19:14
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-10-15T15:41:29.085Z","extensionVersion":"v3.1.2"}
@ealipio
ealipio / flatten.js
Created January 12, 2018 20:31
flatten an array
flattens = (arr) => arr.reduce( (flat, toFlatten) => flat.concat(Array.isArray(toFlatten) ? flatten(toFlatten) : toFlatten) , []);
@ealipio
ealipio / server.js
Last active January 2, 2018 16:55
node http server
var express = require('express'),
app = express(),
cors = require('cors'),
bodyParser = require('body-parser'),
morgan = require('morgan'),
path = require('path');
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json());