Skip to content

Instantly share code, notes, and snippets.

View h3ssan's full-sized avatar

Hassan A Hashim h3ssan

View GitHub Profile

The Issue

$ ssh-add -l
Error connecting to agent: No such file or directory

The Solution

In VSCode make sure that: "remote.SSH.useExecServer": false?

@h3ssan
h3ssan / debian server repository is not valid.md
Created March 9, 2024 17:31
Problem in Debian server that causes apt to not update `repository is not valid yet`.

Cause

  • Type in terminal timedatectl

It should show you a terminal interface contains several dates, Local time, Universal time and RTC time,

$ timedatectl 
               Local time: Sat 2024-03-09 17:29:25 UTC
 Universal time: Sat 2024-03-09 17:29:25 UTC
@h3ssan
h3ssan / github-sign-commits.md
Created March 9, 2024 10:58
GitHub sign commits via SSH not GPG
@h3ssan
h3ssan / fix-php-imagick.md
Last active November 4, 2022 13:48
Enable SVG for php-imagick in NextCloud.

You can enable it by installing the following package in the nextcloud's container.

apt install -y libmagickcore-6.q16-6-extra

@h3ssan
h3ssan / m3u8-to-mp4.md
Created September 13, 2022 15:50 — forked from tzmartin/m3u8-to-mp4.md
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
@h3ssan
h3ssan / convert_netscape_cookies.md
Created June 27, 2022 22:44
Convert netscape cookies to use in python 3 requests library
import re

def parseCookieFile() -> dict:
    ''' parseCookieFile function used to convert
        NetScape cookies file into a dictionary '''
        
    cookies = {}
    with open (COOKIES_FILE, 'r') as file:
 for line in file:
@h3ssan
h3ssan / nuGet_visual_studio.md
Created June 23, 2022 13:04
Add nuGet package manager to Visual Studio

nuGet source API

nuGet Package Source: https://api.nuget.org/v3/index.json

@h3ssan
h3ssan / powershell.md
Last active June 20, 2022 21:57
Some useful powershell scripts

Downloading

Invoke-WebRequest [ iwr ]

A progress bar included by default

Usage:

Invoke-WebRequest -OutFile "C:\somefile" -Uri https://www...;
@h3ssan
h3ssan / compressions.md
Created May 23, 2022 21:34
Best compression algorithms in Linux

Recommended Compression by Extention

Extention compression
.burp .tar.xz
.cap | .pcap | .pcapng .tar.xz

Examples

In the following examples, I'll compress a directory named data to archive named compressed followed with its extention.

@h3ssan
h3ssan / networkmanager not showing up my network.md
Created May 10, 2022 02:53
[Gentoo Linux] NetworkManager is not showing up / detecting MY network / WIFI

[Gentoo] NetworkManager is not showing up / detecting MY network / WIFI

Solution is as simple as re-compiling net-wireless/wpa_supplicant with tkip USE flag.