Skip to content

Instantly share code, notes, and snippets.

View lucasmarqs's full-sized avatar

Lucas Marques lucasmarqs

  • Sao Paulo, Brazil
View GitHub Profile
@lucasmarqs
lucasmarqs / server.rb
Created May 4, 2018 16:51
Ruby web server from std lib
require 'webrick'
require 'json'
server = WEBrick::HTTPServer.new Port: 9000
server.mount_proc '/' do |request, response|
response.body = 'Hello World from WEBrick'
end
server.mount_proc '/ping' do |request, response|
response.body = JSON.generate({pong: true})
@lucasmarqs
lucasmarqs / movies.go
Last active December 19, 2018 11:54
API IMDB
package main
import (
"encoding/json"
"fmt"
"net/http"
"os"
"sort"
"strconv"
"strings"