Skip to content

Instantly share code, notes, and snippets.

View Qiamast's full-sized avatar
:octocat:
On Airplane Mode

Mahdi Qiamast Qiamast

:octocat:
On Airplane Mode
View GitHub Profile
@Qiamast
Qiamast / ProcessBar.py
Last active September 22, 2022 16:45
Python simple process bar
from time import sleep
from tqdm import tqdm
count = 0
for i in tqdm(range(100)):
count += i
sleep(0.2)
@Qiamast
Qiamast / Scroll Progress Bar JS
Created November 1, 2022 14:43
You might have seen some websites with a progress bar at the top of the page that changes as you keep scrolling, indicating the (approximate) position you are on the page.
Adding the Progress Indicator to the Page
To get started, add the following markup to the index.html file right after the opening <body> tag.
<div class="progress-container fixed-top">
<span class="progress-bar"></span>
</div>
fixed-top is a Bootstrap utility class that adds the following CSS styling to an element.
.fixed-top {
position: fixed;
@Qiamast
Qiamast / tmux-cheatsheet.md
Last active December 16, 2022 08:37 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@Qiamast
Qiamast / ChatGPT Terminal Trick Prompt.txt
Last active January 14, 2023 19:08
ChatGPT , I want you to act as a Linux terminal
I want you to act as a Linux terminal. I will type commands and you will reply with what the terminal should show. I want you to only reply with the terminal output inside one unique code block, and nothing else. Do not write explanations. Do not type commands unless I instruct you to do so. When I need to tell you something in English I will do so by putting text inside curly brackets {like this}. My first command is pwd.
@Qiamast
Qiamast / Most Commonly Used Commands.md
Last active February 4, 2023 16:56
Most Commonly Used Commands.md

Most Commonly Used Commands

Linux

  1. ls (List directory contents)

    • Usage: ls [OPTION]... [DIRECTORY]
    • Description: This command lists the contents of a directory, including files and subdirectories. The option can be used to specify various display and sorting options.
  2. cd (Change directory)

  • Usage: cd [DIRECTORY]
@Qiamast
Qiamast / JS_handy_Arrow_function.md
Created February 5, 2023 08:07
Handy Arrow Function JavaScript Project
const log = log => console.log(log)
const war = warn => console.warn(warn)
const inf = info => console.info(info)
const err = error => console.error(error)
const tab = table => console.table(table)
@Qiamast
Qiamast / ascii.py
Last active February 5, 2023 12:30
Generate ASCII art without any packages
def ascii_art(text):
characters = [' ', '.', '*', ':', 'o', '&', '8', '#', '@']
output = ''
for char in text:
index = ord(char) % len(characters)
output += characters[index] + ' '
return output