I wrote this four years ago, so instead use this command:
$ docker rmi $(docker images -q -f dangling=true)
If, for some reason, you do not want to install PostgreSQL using Homebrew.
postgres
user from terminaldef balance(chars: List[Char], open: Int): Boolean = { | |
if (chars.isEmpty) | |
open == 0 | |
else if (chars.head == '(') | |
balance(chars.tail, open + 1) | |
else if (chars.head == ')' && open > 0) | |
// found an unmatched '(' earlier | |
balance(chars.tail, open - 1) | |
else | |
balance(chars.tail, open) |
version: '2' | |
services: | |
redis: | |
restart: always | |
image: sameersbn/redis:latest | |
command: | |
- --loglevel warning | |
volumes: | |
- redis_data:/var/lib/redis |
#cloud-config | |
write_files: | |
- path: /opt/bin/install_docker_compose.sh | |
permissions: 0700 | |
owner: root | |
content: | | |
#!/bin/bash | |
set -e | |
set -u |
variable "do_token" {} | |
provider "digitalocean" { | |
token = "${var.do_token}" | |
} | |
resource "digitalocean_droplet" "gitlab-selfhosted" { | |
image="coreos-stable" | |
name="gitlab" | |
region="sfo2" |
" Many stuff from http://www.drbunsen.org/text-triumvirate.html | |
" Visual mode unmap | |
" Bring back the functionality to press shift+e, shift+w, shift+b | |
" while in visual mode to go to the character right before the next | |
" whitespace | |
vunmap E | |
vunmap W | |
vunmap B |
# see Metaprogramming Ruby, p. 118 | |
module MyModule | |
def my_method; 'hello'; end | |
end | |
obj = Object.new | |
class << obj | |
include MyModule | |
end |