Skip to content

Instantly share code, notes, and snippets.

View Natgho's full-sized avatar
🐍
Dreaming

Sezer Bozkır Natgho

🐍
Dreaming
View GitHub Profile
@Natgho
Natgho / README.md
Created July 9, 2024 16:00 — forked from gilangvperdana/README.md
Pritunl behind Nginx Reverse Proxy

Install Pritunl

sudo apt-get update
sudo apt-get -y upgrade

echo "deb http://repo.pritunl.com/stable/apt focal main" | sudo tee /etc/apt/sources.list.d/pritunl.list
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
curl -fsSL https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
sudo apt update
@Natgho
Natgho / cbar_az_currency_converter.py
Last active May 22, 2024 17:23
cbar.az currency converter python
# Sezer BOZKIR - 2024 - sezerbozkir.com
# firstly install xmltodict library
# pip install xmltodict
import requests
import xmltodict
from datetime import datetime
def convert_currency(expected_date=datetime.now().strftime("%d.%m.%Y")):
url = f"https://cbar.az/currencies/{expected_date}.xml"

How to use nginx as a reverse-proxy with letsencrypt

Your infrastructure

generated via plantuml

Imgur

Requirements

@Natgho
Natgho / redis-clear
Last active February 24, 2023 14:23 — forked from dimasch/redis-clear
Clear a redis cache in Docker
docker exec -i container-name redis-cli FLUSHALL
@Natgho
Natgho / PowSample.py
Created November 21, 2022 22:08
PowSample
value = int(input("Enter maximum value: "))
nested_list = []
result = []
if not 0 < value < 99:
raise Exception("The value N should be between 1-99")
for val in range(1, value + 1):
tmp_list = []
for sub_val in range(val):
tmp_list.append(val)
nested_list.append(tmp_list)
@Natgho
Natgho / wingardiumleviosa.ps1
Created September 20, 2022 09:53
WingardiumLeviosa
Clear-Host
Add-Type -AssemblyName System.Windows.Forms
Echo " __ __.__ .___.__ .____ .__
/ \ / \__| ____ _________ _______ __| _/|__|__ __ _____ | | _______ _|__| ____ ___________
\ \/\/ / |/ \ / ___\__ \\_ __ \/ __ | | | | \/ \ | | _/ __ \ \/ / |/ _ \/ ___/\__ \
\ /| | | \/ /_/ > __ \| | \/ /_/ | | | | / Y Y \ | |__\ ___/\ /| ( <_> )___ \ / __ \_
\__/\ / |__|___| /\___ (____ /__| \____ | |__|____/|__|_| / |_______ \___ >\_/ |__|\____/____ >(____ /
\/ \//_____/ \/ \/ \/ \/ \/ \/ \/ "
Echo ""
Echo " For My Sweet Baby TS World..."
@Natgho
Natgho / index.css
Created January 22, 2021 12:35
index.css
.first-page-content {
flex-direction: column;
justify-content: center;
align-items: center;
left: 0px;
top: 0px;
width: 454px;
height: 454px;
background-color: rebeccapurple;
font-size: 38px;
@Natgho
Natgho / index.js
Created January 22, 2021 12:35
index.js
import geolocation from '@system.geolocation';
import battery from '@system.battery';
export default {
data: {
index: 0,
latlon: "",
accuracy: 0,
battery: 0,
percentage: 0,
@Natgho
Natgho / final.html
Created January 22, 2021 12:34
final.hml
<swiper class="container" index="{{index}}">
<div class="swiper-item first-page">
<div class="first-page-content">
<text class="title">
Konumunuz: {{latlon}}
</text>
<text class="title">
Dogruluk: {{accuracy}}
</text>
<text class="title">
@Natgho
Natgho / callImageFunction.html
Created January 22, 2021 12:33
callImageFunction.hml
<image class="photo-detail" src="/common/huawei.png">
</image>