Session rememberme easy to remember ;)

I was searching around, since it has been a while since I’ve worked at this level with sessions and the gist of it is:

session lifetime = 0 means remove cookie after browser is closed
session lifetime < 0 means remove cookie right now session lifetime > 0 means remove cookie after int seconds

This is valid for everything, gorilla/sessions, php, you name it

Dsero = scam + spam, careful

Long story short, I contacted them on Facebook. I had not once received any spam on Facebook, ever.
A few minutes after I contacted them I received Nigera Spam on Facebook.

Careful. I would advise to not use their “service”.
Their business plan is to get ahold of email addresses and sell them to spammers or use them to send spam themselves.
They do this with their Drupal and WordPress modules.

Nginx and Go through unix socket

Simple setup example

Our nginx vhost:

upstream ango {
server unix:/tmp/ango.sock;
}

# the nginx server instance
server {
listen 80;
server_name go.dev *.go.dev;
error_log /var/log/nginx/go_error.log;

location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_http_version 1.1; # for keep-alive
proxy_pass http://ango/;
proxy_redirect off;
}
}

The Go app

package main

import (
	"fmt"
	"github.com/gorilla/mux"
	"net"
	"net/http"
)

var (
	router *mux.Router = mux.NewRouter()
)

func main() {
	// This is the route and an anonymous or first class function to return 

Hello World

router.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "

Hello World

") }) // This here is an example of Chuck Han https://groups.google.com/forum/#!topic/golang-nuts/41TPj4PWBI8 // Listen on unix socket /tmp/ango.sock l, err := net.Listen("unix", "/tmp/ango.sock") if err != nil { fmt.Printf("%s\n", err) } else { err := http.Serve(l, router) if err != nil { panic(err) } } }