Directories on host machine:
-
/data/certbot/letsencrypt
-
/data/certbot/www
-
Nginx server in docker container
docker run -d --name nginx \
Directories on host machine:
/data/certbot/letsencrypt
/data/certbot/www
Nginx server in docker container
docker run -d --name nginx \
#!/usr/bin/python3 | |
# Copyright (C) 2020 Stefan Vargyas | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
Unofficial AKS Cheat Sheet
Official AKS FAQ is here
let NETWORK_PRESETS = { | |
'GPRS': { | |
'offline': false, | |
'downloadThroughput': 50 * 1024 / 8, | |
'uploadThroughput': 20 * 1024 / 8, | |
'latency': 500 | |
}, | |
'Regular2G': { | |
'offline': false, | |
'downloadThroughput': 250 * 1024 / 8, |
# Reference: https://www.exclamationlabs.com/blog/continuous-deployment-to-npm-using-gitlab-ci/ | |
# GitLab uses docker in the background, so we need to specify the | |
# image versions. This is useful because we're freely to use | |
# multiple node versions to work with it. They come from the docker | |
# repo. | |
# Uses NodeJS V 9.4.0 | |
image: node:9.4.0 | |
# And to cache them as well. |
Ctrl-A [
This will activate copy mode in GNU/screen. Now, you can scroll up/down and look at your data. Use the following keys:
Ctrl-u
and Ctrl-d
scroll the display up/down by the specified amount of lines while preserving the cursor position.
(Default: half screen-full).Ctrl-b
and Ctrl-f
scroll the display up/down a full screen.#!/bin/bash | |
# | |
# Docker Daemon varsayilan olarak ag iletisimi olmadan | |
# sadece Unix socket uzerinden calismaktadir. | |
# Docker Client ve Daemon arasinda HTTPS uzerinden | |
# guvenli iletisimin kurulmasi icin TLS aktif hale getirilmelidir. | |
# Client ve Server/daemon arasindaki guvenli iletisim agi | |
# icin gereken client ve server sertifikasyonlarini | |
# olusturmaliyiz. | |
# |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
# This is just a cheat sheet: | |
# On production | |
sudo -u postgres pg_dump database | gzip -9 > database.sql.gz | |
# On local | |
scp -C production:~/database.sql.gz | |
dropdb database && createdb database | |
gunzip < database.sql.gz | psql database |
import React from 'react'; | |
/* | |
Todo app structure | |
TodoApp | |
- TodoHeader | |
- TodoList | |
- TodoListItem #1 | |
- TodoListItem #2 |