Magic words:
psql -U postgresIf run with -E flag, it will describe the underlaying queries of the \ commands (cool for learning!).
Most \d commands support additional param of __schema__.name__ and accept wildcards like *.*
| #!/usr/bin/env ruby | |
| # | |
| # Usage: git-up | |
| # git-reup | |
| # | |
| # Like git-pull but show a short and sexy log of changes | |
| # immediately after merging (git-up) or rebasing (git-reup). | |
| # | |
| # Inspired by Kyle Neath's `git up' alias: | |
| # http://gist.github.com/249223 |
| ;with recursive t(n) as ( SELECT now() n union all select n + '1 day' from t where n < '2033-01-01') select * from t limit 10; | |
| -- also this works | |
| ;with recursive t(n) as ( SELECT now() n union all select n + '1 day' from t) select * from t limit 1000; |
| package main | |
| import ( | |
| "net/http" | |
| "io/ioutil" | |
| "time" | |
| "log" | |
| "os" | |
| ) |
| defmodule MyApp.Scheduler do | |
| @moduledoc """ | |
| Schedules a Mix task to be run at a given interval in milliseconds. | |
| ## Options | |
| - `:task`: The name of the Mix task to run. | |
| - `:args`: A list of arguments to pass to the Mix task's `run/1` function. | |
| - `:interval`: The time interval in millisconds to rerun the task. |
| import falcon | |
| import os | |
| from app.db import db_session | |
| from app.utils.exceptions import build_error_response | |
| from app.startup import (autoload, add_routes) | |
| wsgi_app = falcon.API(after=[db_session.remove_session]) | |
| autoload("{0}/{1}".format(os.path.dirname(__file__), "handlers")) |
| FROM node:6-onbuild | |
| RUN mkdir -p /usr/src/app | |
| WORKDIR /usr/src/app | |
| COPY package.json /usr/src/app/ | |
| RUN npm install | |
| COPY . /usr/src/app | |
| #next specific build | |
| RUN npm run build |
If you have two days to learn the very basics of modelling, Domain-Driven Design, CQRS and Event Sourcing, here's what you should do:
In the evenings read the [Domain-Driven Design Quickly Minibook]{http://www.infoq.com/minibooks/domain-driven-design-quickly}. During the day watch following great videos (in this order):
| sealed abstract class Tree[A] | |
| case class Item[A] (item: A) extends Tree[A] | |
| case class Section[A] (s: List[Tree[A]]) extends Tree[A] | |
| sealed abstract class Path[A] | |
| case class Top[A] extends Path[A] | |
| case class Node[A] (l: List[Tree[A]], p: Path[A], r: List[Tree[A]]) extends Path[A] | |
| case class Location[A] (t: Tree[A], p: Path[A]) |
| var ints: [String] = [] | |
| for i in 0...10000 { | |
| ints.append(String(i)) | |
| } | |
| var str = "start " + ints.joined(separator:" ") | |
| print(str) |