To start godoc at log in time (so it always there on port 6060 when you need it):
- copy smarticus.godoc.plist to in ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/smarticus.godoc.plist
- visit http://localhost:6060
To start godoc at log in time (so it always there on port 6060 when you need it):
launchctl load ~/Library/LaunchAgents/smarticus.godoc.plist
// in this case we inject the database as argument to another package | |
package httpd | |
import ( | |
"net/http" | |
"path/to/db" | |
) | |
var db *db.Database |
# Assuming an Ubuntu Docker image | |
$ docker run -it <image> /bin/bash |
For reference: http://postgis.net/install
The most reliable way to get PostGIS on OSX is to download and install Postgres.app. Great for development and testing. Do not mix with other installations. Select the extension when prompted.
package main | |
import ( | |
"fmt" | |
. "github.com/r9y9/go.matrix" | |
) | |
// Minimize |Y - HU|^2 st H, U > 0 | |
func NMFEuclid(Y *DenseMatrix, numBasis, numIter int) (*DenseMatrix, *DenseMatrix) { | |
H := Numbers(Y.Rows(), numBasis, 1.0) |
require 'octokit' | |
stats = Octokit.commit('octokit/octokit.rb', '6e0d6ccd5b68173dd030e62f4276793e5d7ce40b').stats | |
stats.additions | |
=> 7 | |
stats.deletions | |
=> 78 |
session: | |
name: "rails" | |
windows: | |
- name: "CODE" | |
layout: 8590,178x45,0,0{114x45,0,0,3,63x45,115,0,4} | |
panes: | |
- cmd: "vim" | |
focus: true | |
- cmd: "guard" | |
- name: "SERVER" |
Beginning Regex | |
Intro to Regular Expressions by Michael Fitzgeral | |
http://www.amazon.com/Introducing-Regular-Expressions-ebook/dp/B008K9OGDA/ref=sr_1_2?ie=UTF8&qid=1374171971&sr=8-2&keywords=Regular+Expressions | |
Using Regular Expressions in Ruby: Part 1 by Nell Shamrell | |
https://www.bluebox.net/insight/blog-article/using-regular-expressions-in-ruby-part-1-of-3 | |
Intermediate Regex |
<% | |
require 'cgi' | |
require 'uri' | |
def attribute(name, value, force_string = false) | |
if value | |
value_string = | |
if force_string | |
'"' + value + '"' | |
else |
https://github.com/djvirgen/virgen-acl Simple and elegant, create your own checks. No middleware?
https://github.com/OptimalBits/node_acl Use as middleware, create your own roles and access. Great choice.
https://github.com/tschaub/authorized Similar to connect roles... but a bit more robust? you can create roles and action, and associate many roles with that action