Skip to content

Instantly share code, notes, and snippets.

View esmaeelE's full-sized avatar
🎯
Focusing

esmaeelE esmaeelE

🎯
Focusing
View GitHub Profile
@esmaeelE
esmaeelE / auth.md
Created May 30, 2024 06:56
Google authenticator alternative for debian
$ sudo apt install otpclient
@esmaeelE
esmaeelE / price.sh
Last active June 6, 2024 00:20
Get crypto prices in terminal
getdayname() (
IFS=';'
set -o noglob
days=$(locale day) || exit
for day do
set -- $days $days
shift "$day" &&
printf '%s\n' "$1"
done
)
@esmaeelE
esmaeelE / udp_ipv6_client.py
Created May 25, 2024 10:12 — forked from tuxmartin/udp_ipv6_client.py
Python UDP IPv6 client & server
import socket
UDP_IP = "::1" # localhost
UDP_PORT = 5005
MESSAGE = "Hello, World!"
print "UDP target IP:", UDP_IP
print "UDP target port:", UDP_PORT
print "message:", MESSAGE
@esmaeelE
esmaeelE / interest.py
Created April 22, 2024 12:24
capital calculation, compound interest
initial_capital=100
raised_capital=120
diff = raised_capital - initial_capital
percent = diff / 100
profit_percent=0.1
def compond_interest(present_value, profit_percent, number):
"""
"""
final_value=present_value*pow(1+profit_percent, number)
@esmaeelE
esmaeelE / msql.yml
Last active March 27, 2024 14:00
microsoft sql server
version: '3.8'
volumes:
sqlserver_data:
services:
sqlserver:
image: mcr.microsoft.com/mssql/server:2019-latest
environment:
- ACCEPT_EULA=Y

For me on a Debian 12 machine with NVIDIA GP107 [GeForce GTX 1050 Ti] here is the workaround.

I install nvidia driver for my card from debain unstable(sid) repository.

Install nvidia driver

Remove all previous nvidea drivers Installed from current repository or By nvidia website script.

@esmaeelE
esmaeelE / game.md
Last active March 1, 2024 10:35
Nostalgic game on debian

How to game in Debian

Wolf3d

$ mkdir -p game/wolf3d
$ sudo apt install dosbox wget unzip
$ wget https://github.com/esmaeelE/archive/blob/main/game/WOLF3D.zip
$ unzip WOLF3D.zip
$ cd WOLF3D
@esmaeelE
esmaeelE / docker.md
Created February 26, 2024 15:20
docker commands

Commands

Logs

docker logs -f ${container_name}
@esmaeelE
esmaeelE / network_commands.md
Created February 26, 2024 15:09
Networking commands

Networks

Change IP in debian based systems

/etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
@esmaeelE
esmaeelE / about.org
Created February 26, 2024 15:07
Orgmode

convert markdown to orgmode

pandoc -f markdown -t org -o out.org input.md