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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo fallocate -l 16G /swapfile | |
sudo dd if=/dev/zero of=/swapfile bs=1M count=16384 | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab | |
# check | |
# sudo swapon --show | |
# free -h |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
generated via plantuml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker exec -i container-name redis-cli FLUSHALL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Clear-Host | |
Add-Type -AssemblyName System.Windows.Forms | |
Echo " __ __.__ .___.__ .____ .__ | |
/ \ / \__| ____ _________ _______ __| _/|__|__ __ _____ | | _______ _|__| ____ ___________ | |
\ \/\/ / |/ \ / ___\__ \\_ __ \/ __ | | | | \/ \ | | _/ __ \ \/ / |/ _ \/ ___/\__ \ | |
\ /| | | \/ /_/ > __ \| | \/ /_/ | | | | / Y Y \ | |__\ ___/\ /| ( <_> )___ \ / __ \_ | |
\__/\ / |__|___| /\___ (____ /__| \____ | |__|____/|__|_| / |_______ \___ >\_/ |__|\____/____ >(____ / | |
\/ \//_____/ \/ \/ \/ \/ \/ \/ \/ " | |
Echo "" | |
Echo " For My Sweet Baby TS World..." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import geolocation from '@system.geolocation'; | |
import battery from '@system.battery'; | |
export default { | |
data: { | |
index: 0, | |
latlon: "", | |
accuracy: 0, | |
battery: 0, | |
percentage: 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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"> |
NewerOlder