screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
screen -AmdS docker ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
screen -r docker
# enter, then disconnect with Ctrl-a d
screen -S docker -p 0 -X stuff $(printf root\\r\\n)
screen -r docker
#!/bin/bash | |
http POST https://gitlab.com/ci/api/v1/runners/register.json token=<registration token> -b | jq .token |
Settting up a Container Registry with docker-gitlab
This should be used for new users to getting started with the container registry feature on docker-gitlab.
-
Docker Distribution >= 2.4
-
Docker GitLab >= 8.8.4 ( #708 must be merged)
-
TLS certificates because it should be run with https it's not designed to use it without https
Version numbers should be the ones you want. Here I do it with the last ones available at the moment of writing.
The simplest way to install elixir is using your package manager. Sadly, at the time of writing only Fedora shows
the intention to keep its packages up to date. There you can simply sudo dnf install erlang elixir
and you are good to go.
Anyway, if you intend to work with several versions of erlang or elixir at the same time, or you are tied to
a specific version, you will need to compile it yourself. Then kerl
and exenv
are your best friends.
prompt_elixir() { | |
local elixir_prompt="$(mix --version 2>/dev/null)" | |
[[ -z "${elixir_prompt}" ]] && return | |
ELIXIR_ICON=$'\uE1C3' # alchemist | |
$1_prompt_segment "$0" "magenta" "white" "${elixir_prompt:4} $ELIXIR_ICON" | |
} |
% shop.erl | |
-module(shop). | |
-export([cost/1]). | |
cost(oranges) -> 5; | |
cost(newspaper) -> 8; | |
cost(apples) -> 2; | |
cost(pears) -> 9; | |
cost(milk) -> 7. |
Fruit = [apple,pear,orange] . | |
MakeTest = fun(L) -> (fun(X) -> lists:member(X, L) end) end. | |
IsFruit = MakeTest(Fruit). | |
IsFruit(pear). | |
% result: true | |
IsFruit(apple). | |
% result: true |
class Program { | |
static void Main(string[] args) { | |
DateTime Jan1st1970 = new DateTime(1970,1,1,0,0,0); | |
long diff = (long) (DateTime.Now.ToLocalTime() - Jan1st1970).TotalMilliseconds; | |
Console.WriteLine(diff); | |
} | |
} |
#!/bin/sh | |
DATE=$(date +%d-%m-%Y) | |
MySQL_USER="" | |
MySQL_PASS="" | |
BACKUPNAME="mysql_"$DATE".sql" | |
docker exec mysql mysqldump -u$MySQL_USER -p$MySQL_PASS --all-databases > $BACKUPNAME |
/* | |
* Transfer Object as per diagram | |
*/ | |
public class CircleTransfer{ | |
private int x; | |
private int y; | |
private int radius; | |
void setX(int x){ | |
this.x=x; | |
} |