Reminders for running docker
docker run -d -p 127.0.0.1:9000:80 -it debian /bin/bash
| #!/bin/bash | |
| # | |
| # Download and install a particular version of Go. | |
| # | |
| # Assumes versions are installed at ~/.go/versions/ | |
| # | |
| # Author : Scott Barr | |
| # Date : 23 Apr 2016 | |
| # |
| ## Go And Postgresql | |
| Some notes on options for Go and Postgresql access. | |
| ## Drivers | |
| - https://github.com/lib/pq | |
| - https://github.com/jackc/pgx |
| package main | |
| import ( | |
| "fmt" | |
| "math/rand" | |
| "time" | |
| ) | |
| type Game struct { | |
| Welcome string |
| package main | |
| import ( | |
| "flag" | |
| "fmt" | |
| "io/ioutil" | |
| "os" | |
| "gopkg.in/yaml.v2" | |
| ) |
| package main | |
| import ( | |
| "fmt" | |
| "io/ioutil" | |
| "os" | |
| "gopkg.in/yaml.v2" | |
| ) |
| package main | |
| import ( | |
| "context" | |
| "flag" | |
| "fmt" | |
| "net/http" | |
| "github.com/gorilla/mux" | |
| "github.com/satori/go.uuid" |
| # See https://support.500px.com/hc/en-us/articles/204910987-What-RSS-feeds-are-available- | |
| out=`curl -s https://500px.com/editors.rss` | |
| urls = out.split("\n").select { |url| url.include?("img src") }.map { |s| s.split('"')[3] } | |
| urls.each do |url| | |
| id = url.split("/").last | |
| filename = "#{id}.jpg" |
| alias emacsd="/usr/bin/emacs --daemon" | |
| alias emacs="/usr/bin/emacsclient -t -nw" |