Skip to content

Instantly share code, notes, and snippets.

View srom's full-sized avatar

Romain Strock srom

View GitHub Profile
Verifying that +srom is my Bitcoin username. You can send me #bitcoin here: https://onename.io/srom
@srom
srom / web.js
Created May 30, 2014 12:09
Express.js boilerplate. Useful for quickly firing up a local web server.
var express = require('express');
var app = express();
// config
app.use(express.logger()); // log requests
app.use(express.favicon()); // default favicon
app.use(express.static(__dirname + '/static')); // handle static files
// start
var port = process.env.PORT || 3000;
@srom
srom / go.tour.webcrawler.go
Last active August 29, 2015 14:02
A solution to "A Tour of Go #73: Web Crawler"
package main
import "fmt"
type Fetcher interface {
// Fetch returns the body of URL and
// a slice of URLs found on that page.
Fetch(url string) (body string, urls []string, err error)
}