Create nginx.conf
file:
server {
listen 80;
server_name your_domain.uz;
library(geojsonsf) | |
library(sf) | |
library(rayrender) | |
#Data source: https://github.com/telegeography/www.submarinecablemap.com | |
cables = geojson_sf("cable-geo.json") | |
cablescene = list() | |
counter = 1 | |
for(i in 1:length(cables$geometry)) { |
Docker Desktop stores docker data in 2 distros
These distros are installed on the system drive by default.
To move them to another drive, these distros can be exported, deleted and imported from the new location.
Here I'm going to show some creative and fun ways of generating random numbers without using random
package in python.
When we call time()
function of the package time
, it returns floating point number - current time in seconds since the Epoch:
>>> time.time()
3392849227.6848479
Directories on host machine:
/data/certbot/letsencrypt
/data/certbot/www
Nginx server in docker container
docker run -d --name nginx \
import base64 | |
from cryptography.hazmat.backends import default_backend | |
from cryptography.hazmat.primitives.asymmetric import rsa | |
from cryptography.hazmat.primitives import serialization | |
from cryptography.hazmat.primitives import hashes | |
from cryptography.hazmat.primitives.asymmetric import padding | |
def utf8(s: bytes): | |
return str(s, 'utf-8') |
#!/bin/sh | |
# Author : Wang Poh Peng | |
# Description : Use FFMPEG to download videos into mkv or mp4 format | |
RED='\033[1;31m' | |
NC='\033[0m' # No Color | |
GREEN='\033[0;32m' | |
CYAN='\033[0;36m' |
This is a compiled list of falsehoods programmers tend to believe about working with time.
Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.
rebase
vs merge
).rebase
vs merge
)reset
vs checkout
vs revert
)git rev-parse
)pull
vs fetch
)stash
vs branch
)reset
vs checkout
vs revert
)