docker run -p 9042:9042 -d --name cassandra mashape/cassandra
docker run -p 8000:8000 -p 8001:8001 -d --name kong --link cassandra:cassandra mashape/kong
docker run -it --name pgb --rm -e POSTGRES_PASSWORD=pass postgres
docker run -itp 8000:8000 --link pgb:postgres -e POSTGRES_DB_NAME=tracker biscarch/postgrest
By default postgres should be in UTC , show timezone; if it isn't change configuration timezone = 'UTC' in postgresq.conf
Store dates always in UTC, no mather user timezone, use AT TIME ZONE '' to convert it your query.
To know a list of valid values select * from pg_timezone_names;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "reflect" | |
| ) | |
| type User struct { | |
| Name string | |
| Age int |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <link rel="import" href="../topeka-elements/theme.html"> | |
| <link rel="import" href="../topeka-elements/topeka-resources.html"> | |
| <link rel="import" href="../topeka-elements/topeka-app.html"> | |
| <polymer-element name="my-element"> | |
| <template> | |
| <style> | |
| :host { | |
| position: absolute; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| lsof -i :9988 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ vim ~/.tmux.conf | |
| set -g mode-mouse on | |
| set -g mouse-resize-pane on | |
| set -g mouse-select-pane on | |
| set -g mouse-select-window on | |
| set -g mode-mouse on | |
| set -g default-terminal "screen-256color" | |
| :x! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <link rel="import" href="../topeka-elements/theme.html"> | |
| <link rel="import" href="../topeka-elements/topeka-resources.html"> | |
| <link rel="import" href="../topeka-elements/topeka-app.html"> | |
| <link rel="import" href="../ace-element/ace-element.html"> | |
| <link rel="import" href="../cool-clock/cool-clock.html"> | |
| <link rel="import" href="../chart-js/chart-js.html"> | |
| <polymer-element name="my-element"> | |
| <template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| /* | |
| * Script that scrapes google front page | |
| * Usage: ./google [<query>] | |
| * e.g. ./google hacker news | |
| */ | |
| import ( | |
| "fmt" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "_id": "_design/example", | |
| "views": { | |
| "foo": { | |
| "map": "function(doc){ emit(doc._id, doc._rev)}" | |
| } | |
| }, | |
| "updates": { | |
| "lib": { | |
| "libjsonpatch": "var jsonpatch;(function(e){function i(e,i){var s=false,o=0,u=i.length,a;while(o<u){a=i[o];var f=a.path.split(\"/\");var l=e;var c=1;var h=f.length;while(true){if(r(l)){var p=parseInt(f[c],10);c++;if(c>=h){s=n[a.op].call(a,l,p,e);break}l=l[p]}else{var d=f[c];if(d.indexOf(\"~\")!=-1)d=d.replace(/~1/g,\"/\").replace(/~0/g,\"~\");c++;if(c>=h){s=t[a.op].call(a,l,d,e);break}l=l[d]}}o++}return s}var t={add:function(e,t){e[t]=this.value;return true},remove:function(e,t){delete e[t];return true},replace:function(e,t){e[t]=this.value;return true},move:function(e,t,n){var r={op:\"_get\",path:this.from};i(n,[r]);i(n,[{op:\"remove\",path:this.from}]);i(n,[{op:\"add\",path:this.path,value:r.value}]);return true},copy:function(e,t,n){var r={op:\"_get\",path:this.from};i(n,[r]);i(n,[{op:\"add\",path:this.path,value:r.value}]);re |