Skip to content

Instantly share code, notes, and snippets.

View FLAK-ZOSO's full-sized avatar
๐Ÿ‡ช๐Ÿ‡ช
studying in Estonia and working at TalTech's HPC

Mattia Marchese FLAK-ZOSO

๐Ÿ‡ช๐Ÿ‡ช
studying in Estonia and working at TalTech's HPC
View GitHub Profile
@gilangvperdana
gilangvperdana / README.md
Last active March 18, 2026 13:38
BIND9 DNS Forwarder

Forward DNS with BIND9 and Reverse It with NGINX !

  • If you want to create a DNS forwarder Instance who will be Forward your IP DNS Private to DNS Public you can follow this guide.
  • This guide will be implemented on Ubuntu 20.04 LTS.
  • This bind9 port (53) will be forwarded too with Nginx.

Prerequisite

  • Ubuntu Server 20.04 LTS
    • 1 for BIND9
    • 1 for VM testing
    • 1 for Nginx Reverse Proxy
with open('file.txt', 'r') as file:
lines = file.read().split('\n') # lines is a list of the lines of the file
dictionary: dict = {}
for index, line in enumerate(lines):
line = line.split(' ')
dictionary[str(index)] = {
"white": line[0],
"black": line[1],
"white score": line[2],
"black score": line[4]
@ofhouse
ofhouse / install-java-versions.md
Created October 13, 2020 15:16
Install and manage multiple Java SDK versions on Ubuntu

Install and manage multiple Java versions on Ubuntu

This guide shows per example the installation of the Java SDK versions 8 (LTS, already installed) and 11 (LTS).

1. Check which Java versions are avaialable or already installed

apt --names-only search "openjdk-.*jre$"

> Sorting... Done
@Soheab
Soheab / wait_for in command.md
Last active June 19, 2025 11:38
Examples for a wait_for in ext.commands.

This gist shows how to make the bot wait for a message or reaction after doing a command. This should not be copypasted.

Docs

Check the discord.py docs for a detailed explanation of how it all works internally and which kwargs it takes.

Commands

See here two commands, one waiting for any message in a channel and the other waiting for a reaction with a specific emoji.

Check

@fnky
fnky / ANSI.md
Last active May 27, 2026 19:20
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
DROP DATABASE IF EXISTS ๐Ÿ“š;
CREATE DATABASE ๐Ÿ“š;
USE ๐Ÿ“š;
CREATE TABLE ๐Ÿ‘ค(
๐Ÿ”‘ INTEGER PRIMARY KEY,
๐Ÿ—ฃ varchar(64), -- name
๐Ÿ—“ DATE -- date of registration
@mihow
mihow / load_dotenv.sh
Last active April 20, 2026 14:50
Load environment variables from dotenv / .env file in Bash
# The initial version
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
# My favorite from the comments. Thanks @richarddewit & others!
set -a && source .env && set +a
@ravibhure
ravibhure / git_rebase.md
Last active April 30, 2026 19:30
Git rebase from remote fork repo

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream

@gboeing
gboeing / pypi.md
Last active April 19, 2026 15:31
How to organize and distribution a package on pypi

To distribute a package on pypi

Directory structure

/project/
    /package/
        __init__.py
        module.py
 setup.py
Development Status :: 1 - Planning
Development Status :: 2 - Pre-Alpha
Development Status :: 3 - Alpha
Development Status :: 4 - Beta
Development Status :: 5 - Production/Stable
Development Status :: 6 - Mature
Development Status :: 7 - Inactive
Environment :: Console
Environment :: Console :: Curses
Environment :: Console :: Framebuffer