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
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 26, 2024 12:21
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@tassoevan
tassoevan / media-length.sh
Last active September 26, 2022 18:39
Bash script to measure length (duration) of media files in a directory
#!/bin/bash -e
directory=$1
[ -z "$directory" ] || directory=`pwd`
total=0
function round_float {
echo "($1 + 0.5)/1" | bc
}
If you want to achieve greatness stop asking for permission. ~Anonymous
Things work out best for those who make the best of how things work out. ~John Wooden
To live a creative life, we must lose our fear of being wrong. ~Anonymous
If you are not willing to risk the usual you will have to settle for the ordinary. ~Jim Rohn
Trust because you are willing to accept the risk, not because it's safe or certain. ~Anonymous
Take up one idea. Make that one idea your life - think of it, dream of it, live on that idea. Let the brain, muscles, nerves, every part of your body, be full of that idea, and just leave every other idea alone. This is the way to success. ~Swami Vivekananda
All our dreams can come true if we have the courage to pursue them. ~Walt Disney
Good things come to people who wait, but better things come to those who go out and get them. ~Anonymous
If you do what you always did, you will get what you always got. ~Anonymous
Success is walking from failure to failure with no loss of enthusiasm. ~Winston Chu
@wis
wis / total-videos-length-in-directory.ps1
Created September 28, 2016 09:00
Powershell script to get the total length of all videos in Directory
# Needs the path where your dll is
Add-Type -Path "C:\taglib-sharp.dll"
Function Get-VideoDetails {
param ($targetDirectory)
Get-ChildItem $targetDirectory -Include *.mp4 -Recurse -Force | ForEach {
$video = [TagLib.File]::Create($_.FullName)
New-Object PSObject -Property @{
@mahmoud-eskandari
mahmoud-eskandari / README.md
Last active April 18, 2023 06:01
SSH Tunnel as systemd service

${LOCAL_ADDR IP:PORT}

یعنی سرور ایرانتون و پورت داخلی که میخواهید روش ساکس داشته باشید و باید با این جایگزین بشود.

مثال:

10.10.10.10:9090

و قسمت پایین هم یوزر سرور خارجتون و آدرس IP سرور خارجیتونه که باید جایگزین کنید تو خط 7 فایل ssh-tunnel-as-systemd.sh

@mattupham
mattupham / @mattupham Omegle IP Location Finder
Last active May 12, 2024 15:05
@mattupham Omegle IP Location Finder - Ask Questions in our Discord, links below
// Subscribe on YouTube, and follow on TikTok (@mattupham)! Socials found below:
// https://mattupham.com/links
// @ me on Discord with any questions!
https://link.mattupham.com/discord
// --------------------------------------------
// PLEASE REPLACE "your-api-key-here" WITH AN
// API KEY FROM https://ipgeolocation.io/
let apiKey = "your-api-key-here";
@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 / 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 / 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