- Common case: nested name with NO dot
# .data.name
# drop table tasks;
# ddl
create table tasks
(
id int primary key,
seq int not null unique
);
START TRANSACTION;
insert into tasks (seq)
values (null);
update tasks
set seq = LAST_INSERT_ID()
where id = LAST_INSERT_ID();
# HTTP request to icanhazip.com | |
while true ; do curl icanhazip.com ; sleep 1; done |
version: "3.8" | |
services: | |
app: | |
container_name: my-app | |
image: nginx | |
ports: | |
- "8080:80" | |
env_file: | |
- .env |
version: "3.8" | |
services: | |
app: | |
container_name: my-app | |
build: | |
context: . | |
dockerfile: Dockerfile | |
ports: | |
- "8080:80" | |
env_file: |
# git log | |
# Options | |
# --decorate: the ref name prefixes refs/heads/, refs/tags/ and refs/remotes/ will not be | |
printed. | |
# --graph: Draw a text-based graphical representation of the commit history on | |
printed in between commits | |
# --oneline: This is a shorthand for "--pretty=oneline --abbrev-commit" | |
#!/bin/sh | |
USERNAME=<DOCKER USERNAME> | |
PASSWORD=<DOCKER PASSWORD> # alternatively, use access tokens. See https://docs.docker.com/docker-hub/access-tokens/ | |
echo $PASSWORD | docker login -u $USERNAME --password-stdin |
#!/bin/bash | |
# Mount PWD onto the docker container path /app | |
docker run \ | |
-v ${PWD}:/app | |
node:16-alpine \ # image name i.g. ubuntu, ... | |
-it /bin/sh | |
# usage |