Skip to content

Instantly share code, notes, and snippets.

View GooDeeJAY's full-sized avatar
👨‍💻
Hacking Pentagon

Jasur Yusupov GooDeeJAY

👨‍💻
Hacking Pentagon
View GitHub Profile
@GooDeeJAY
GooDeeJAY / docker_certbot.md
Last active October 30, 2023 12:21
Docker Certbot

Docker Certbot obtain SSL Certificate

Starting Nginx Server

Create nginx.conf file:

server {
  listen 80;
 server_name your_domain.uz;
@tylermorganwall
tylermorganwall / submarine_cable_map.R
Last active April 19, 2024 07:36
Submarine Cable Map Dataviz
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)) {
@cbuckowitz
cbuckowitz / README.md
Last active January 21, 2024 21:17
Change Storage Location for Docker Desktop with WSL2 #DockerDesktop #WSL2

Change the Storage Location for Docker Desktop with WSL2

Docker Desktop stores docker data in 2 distros

  • docker-desktop
  • docker-desktop-data

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.

@GooDeeJAY
GooDeeJAY / random_generator.md
Last active August 3, 2022 06:20
Creative and fun ways of generating random numbers

Fun and creative ways of generating random numbers in python

Here I'm going to show some creative and fun ways of generating random numbers without using random package in python.

Example 1 - Generating random number in range 0-9

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
@maxivak
maxivak / _0__ssl_certbot_letsencrypt.md
Last active April 16, 2024 21:48
Let's encrypt SSL certificates using certbot in docker

Directories on host machine:

  • /data/certbot/letsencrypt

  • /data/certbot/www

  • Nginx server in docker container

docker run -d --name nginx \
@gabrielfalcao
gabrielfalcao / rsa_encryption.py
Created November 30, 2019 00:39
Using python cryptography module to generate an RSA keypair, serialize, deserialize the keys and perform encryption and decryption
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')
@thepoppingone
thepoppingone / m3u8streamffmpegdl.sh
Last active February 27, 2023 14:32
Download m3u8 playlist with ffmpeg - step by step download script (ffmpeg binary required)
#!/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'
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active April 26, 2024 04:52
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

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.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active April 26, 2024 02:03
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux