Install package
# guix package -i node
Enable user handle global packages (npm)
# an opiniated docker-compose for the Art of PostgreSQL | |
# copy this file to docker-compose.yml and then: | |
# 1. copy extra resources to the same file | |
# 2. `docker-compose up` | |
# 3. open http://localhost:9088 with username [email protected] and password admin | |
# 4. add connection to database db.dev using host `db.dev` database name `book` username `book` password `book` | |
# 5. `docker-compose down` | |
version: '3.7' | |
services: | |
db.dev: |
package main | |
import ( | |
"flag" | |
"golang.org/x/net/websocket" | |
"io" | |
"log" | |
"net" | |
"net/http" | |
"os" |
function pollUrl(url, renderer) { | |
return function(render){ | |
if(render == undefined) { render = renderer; } | |
$.getJSON(url, function(data){ | |
render(data); | |
}).always(function(){ | |
setTimeout(pollUrl(url, render), 5000); | |
}); | |
}; |
//this can save a lot time of debugging | |
//check type assertion | |
if v, ok := varI.(T); ok { | |
.. | |
} |