Skip to content

Instantly share code, notes, and snippets.

View tazihad's full-sized avatar
🎯
Focusing

Zihad tazihad

🎯
Focusing
View GitHub Profile
@tazihad
tazihad / waitForKeyElements.js
Created December 26, 2022 04:50 — forked from BrockA/waitForKeyElements.js
A utility function, for Greasemonkey scripts, that detects and handles AJAXed content.
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
@tazihad
tazihad / a-simpler-way-to-manage-your-dotfiles.md
Created December 14, 2022 12:22
A simpler way to manage your dotfiles

Source: https://www.anand-iyer.com/blog/2018/a-simpler-way-to-manage-your-dotfiles.html
Like most folks, I use git to manage my dotfiles. This lets me have a versioned backup for my configurations, and if something breaks (and it does often for me) I can revert to a working configuration fairly easily. For a long time, I’ve followed the normal path of having a dotfiles folder and a script that symlinks into the files in it from my $HOME. Recently, I came across this thread in HackerNews and it literally blew my mind. In this post, I would like to share this very elegant solution that avoids the need for any symlinking.

The key idea is really simple: make $HOME the git work-tree. The normal way of doing this would be to do a git init in your $HOME, but that would totally mess up git commands if you have other repositories in your $HOME (also, you probably don’t want your entire $HOME in a git repo). So, instead, we will create a dummy folder and initialize a bare repository (essentially a git repo with no w

@tazihad
tazihad / ohmyzsh.md
Created October 11, 2022 18:30 — forked from yovko/ohmyzsh.md
ZSH (using Oh My ZSH) on Manjaro Linux

ZSH (using Oh My ZSH) on Manjaro Linux

0. If ZSH is not already installed on your Manjaro system you can do it with the command:

sudo pacman -Syu zsh

You do not need to install manjaro-zsh-config and all the other related packages like zsh-syntax-highlighting, zsh-history-substring-search, zsh-autosuggestions, etc., as we will use Oh My Zsh.

@tazihad
tazihad / firefox-ubuntu-debian.md
Last active September 21, 2022 00:56
Firefox stable is pain to install in Debian and in Ubuntu. Let's install self updating binary from directly mozilla.

Download Firefox. https://www.mozilla.org/en-US/firefox

Download the Firefox version you want directly from the official website Uncompress the archives:

  • in the /opt directory (system-wide installation - requires Root privileges)
  • in your home directory or ~/.opt (install only for the current user)

Create a file firefox-stable.desktop (replace stable with beta or nightly if needed) with the contents below:

@tazihad
tazihad / custom_silverblue_iso.md
Created September 19, 2022 21:15 — forked from JayDoubleu/custom_silverblue_iso.md
Scripts to create custom fedora silverblue iso
mkdir isobuild && cd isobuild
sudo dnf install rpm-ostree lorax -y
git clone -b f33 https://pagure.io/workstation-ostree-config
git clone -b f33 https://pagure.io/fedora-lorax-templates.git
mkdir repo
ostree init --repo=repo
rpm-ostree compose tree --repo=$(pwd)/repo \
	$(pwd)/workstation-ostree-config/fedora-silverblue.yaml

Waydroid Android 10 on Fedora 5.15+ Kernel

Enable waydroid repo from aleasto copr

sudo dnf copr enable aleasto/waydroid

Install waydroid

@tazihad
tazihad / traffic-monitor-howto
Created January 8, 2022 15:54
How to use TrafficMonitor
1. Download "..._x64.zip" version from latest.
https://github.com/zhongyang219/TrafficMonitor/releases
2. Extract it to any location. Open "TrafficMonitor.exe"
3. Right click on the small window
- Click "Show taskbar window"
- again uncheck "show main window"
5. Right click on the "taskbar window of Traffic monitor.
- Go "Options..."
- Click "General Settings"
- Check "Auto run when windows starts".
@tazihad
tazihad / reddit_auto_expand.user.js
Created December 10, 2021 15:51 — forked from Dregu/reddit_auto_expand.user.js
Reddit Auto Expand
// ==UserScript==
// @name Reddit Auto Expand and keyboard navigation
// @namespace http://www.reddit.com/
// @version 0.1
// @description Auto expand all expandos on new reddit and a keyboard navigation that's not retarded.
// @author Dregu
// @match https://www.reddit.com/*
// @grant none
// ==/UserScript==
@tazihad
tazihad / Microsoft Products iso
Created January 19, 2021 17:31
windows 7, 10 iso.
Windows 7 iso torrents:
https://web.archive.org/web/20180704214535/http://mirror.corenoc.de/digitalrivercontent.net/
@tazihad
tazihad / youtube-dl-cheat-sheet
Last active November 8, 2023 21:05
youtube-dl cheat sheet.
*** Best video in mp4 format [if available] in 1080p ***
$ youtube-dl -f 'bestvideo[height<=1080 && ext=mp4]+bestaudio' https://www.youtube.com/watch?v=LXb3EKWsInQ
*** For ease of use make alias for this command ***
$ alias yt="youtube-dl -f 'bestvideo[ext=mp4][height<=1200]+bestaudio[ext=m4a]' -o '%(title)s'"
Youtube-dl Tutorial With Examples
Here, I have compiled most commonly used Youtube-dl commands to download a video or playlist from YouTube.