Skip to content

Instantly share code, notes, and snippets.

View AmmarHaddadi's full-sized avatar

Ammar Haddadi AmmarHaddadi

View GitHub Profile
@AmmarHaddadi
AmmarHaddadi / Mediakeys.ahk
Last active June 1, 2023 17:04 — forked from mistic100/Mediakeys.ahk
Media keys shortcuts for AutoHotkey
#NoEnv
SendMode Input ;
NumpadEnter::Send {Media_Play_Pause}
^!Left::Send {Media_Prev}
^!Right::Send {Media_Next}
NumpadMult::Send {Volume_Mute}
NumpadAdd::Send {Volume_Up}
NumpadSub::Send {Volume_Down}
@AmmarHaddadi
AmmarHaddadi / CertificateCloning.ps1
Created March 23, 2023 17:59 — forked from mattifestation/CertificateCloning.ps1
The steps required to clone a legitimate certificate chain and sign code with it.
# We'll just store the cloned certificates in current user "Personal" store for now.
$CertStoreLocation = @{ CertStoreLocation = 'Cert:\CurrentUser\My' }
$MS_Root_Cert = Get-PfxCertificate -FilePath C:\Test\MSKernel32Root.cer
$Cloned_MS_Root_Cert = New-SelfSignedCertificate -CloneCert $MS_Root_Cert @CertStoreLocation
$MS_PCA_Cert = Get-PfxCertificate -FilePath C:\Test\MSKernel32PCA.cer
$Cloned_MS_PCA_Cert = New-SelfSignedCertificate -CloneCert $MS_PCA_Cert -Signer $Cloned_MS_Root_Cert @CertStoreLocation
$MS_Leaf_Cert = Get-PfxCertificate -FilePath C:\Test\MSKernel32Leaf.cer
@AmmarHaddadi
AmmarHaddadi / ffmpeg trim video.md
Last active February 25, 2023 19:09
Trim a video using ffmpeg
ffmpeg -i filename.mp4 -ss 00:00:00 -to 00:01:00 -c copy trimmed_video.mp4

>time is in hh:mm:ss format

@AmmarHaddadi
AmmarHaddadi / Swoopy.py
Created February 21, 2023 13:51 — forked from pich4ya/Swoopy.py
Decrypt Chrome/Opera Saved Passwords - 2018
# https://geekswipe.net/technology/computing/swoop-chrome-passwords-decrypt-with-python/
# https://github.com/karthikeyankc/Swoopy/blob/master/Swoopy.py
# INSTALL: https://github.com/mhammond/pywin32/releases
import os
import sqlite3
import win32crypt
#path to user's login data
@AmmarHaddadi
AmmarHaddadi / git.md
Created November 14, 2022 12:53
git 101

Download Git @ https://git-scm.com/downloads , or sudo pacman -S git for arch based distros

Before you Start

Give your commits a signature / credits

$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com

local repo

git init to initialize git inside your current directory\

@AmmarHaddadi
AmmarHaddadi / readme.md
Created November 14, 2022 12:50
how to track dotfiles on github

Steps

  1. make sure you're in the your ~home directory , you can type cd or ~ to go there

  2. git init --bare $HOME/dotfiles

you can replace dotfiles with a name of choice , I chose .dotfiles

  1. echo alias config='/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME' >> .zshrc

feel free to name the alias what ever you want , I named it dotfiles this adds an alias named config , so instead of typing git --git-dir=home/dotfiles all you need to do is to write config in your terminal on bash replace .zshrc with .bashrc

  1. restart the shell to load the new config file