Done on Linux (Ubuntu tested)
cd $HOME
virtualenv --python=/usr/bin/python2.7 pgadmin4
source pgadmin4/bin/activate
| def flatten(list), do: flatten(list, []) |> Enum.reverse | |
| def flatten([h | t], acc) when h == [], do: flatten(t, acc) | |
| def flatten([h | t], acc) when is_list(h), do: flatten(t, flatten(h, acc)) | |
| def flatten([h | t], acc), do: flatten(t, [h | acc]) | |
| def flatten([], acc), do: acc |
| <html> | |
| <head> | |
| <script src="http://localhost:8081/auth/js/keycloak.js" type="text/javascript"> | |
| </script> | |
| </head> | |
| <body> | |
| <h1>js-demo-app</h1> | |
| # Make sure you grab the latest version | |
| curl -OL https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip | |
| # Unzip | |
| unzip protoc-3.2.0-linux-x86_64.zip -d protoc3 | |
| # Move protoc to /usr/local/bin/ | |
| sudo mv protoc3/bin/* /usr/local/bin/ | |
| # Move protoc3/include to /usr/local/include/ |
| // C++ includes used for precompiling -*- C++ -*- | |
| // Copyright (C) 2003-2013 Free Software Foundation, Inc. | |
| // | |
| // This file is part of the GNU ISO C++ Library. This library is free | |
| // software; you can redistribute it and/or modify it under the | |
| // terms of the GNU General Public License as published by the | |
| // Free Software Foundation; either version 3, or (at your option) | |
| // any later version. |
| package main | |
| import ( | |
| "io/ioutil" | |
| "log" | |
| "strings" | |
| "net/http" | |
| "encoding/json" | |
| "fmt" | |
| "time" |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
Picking the right architecture = Picking the right battles + Managing trade-offs
| /** | |
| * MongoDB Shell mongos helper functions and custom prompt | |
| * | |
| * https://gist.github.com/jasoares/3b21af33a7d62263010f | |
| */ | |
| sh.getBalancerSummary = function(since) { | |
| // 24 hours by default | |
| since = since || new Date(ISODate().getTime() - 1000 * 60 * 60 * 24); | |
| print("Printing Summary since " + since); |
The standard names for indexes in PostgreSQL are:
{tablename}_{columnname(s)}_{suffix}
where the suffix is one of the following:
pkeyfor a Primary Key constraint;keyfor a Unique constraint;exclfor an Exclusion constraint;idxfor any other kind of index;