Skip to content

Instantly share code, notes, and snippets.

View vheidari's full-sized avatar
🏠
Working from home

Vahid Heidari vheidari

🏠
Working from home
View GitHub Profile
@vheidari
vheidari / rollbacking-and-switching-between-your-linux-kernel.md
Last active July 14, 2022 10:51
Linux Mint - Rollbacking and switching between linux kernels with an example :)

Let's starting with a conflict, between Virtualbox and Qemu with kernel version

To compiling and running SerenityOS on linux Mint with kernel version "5.4.0-122-generic", qemu x86 has some isssus with this version of kernel. This version is too old for lastest version of qemu. to resolve this problems we just need to update linux kernel to newest version :

qemu error, when we runnig SerenityOs on 5.4.0-122-generic linux kernel :

qemu-system-i386: -gdb tcp:127.0.0.1:1234: gdbstub: KVM doesn't support guest debugging

To check current version on your Machine you can use following command inside your terminal:

@vheidari
vheidari / bring-7zip-zstd.md
Last active July 31, 2022 22:21
Apt, old package ( p7zip Version 16.02 ) and new tech issues ;) - 7z zStandard supporting on Linux

Issues : ( p7zip Version 16.02 ) doesn't support zStandard compression on Linux. let's bring it to your machine

if you have a package with .7z extension and this package archived with zStandard method. p7zip Version 16.02 installed from Apt official repository dosen't support to unpack your package and when you try to decompressing it you should, encounter with some error like below :

7-Zip: Unsupported Compression Method

To check what type of methods that your 7z supported you can use one of the following command :

- 7z i 
@vheidari
vheidari / install-hp-printer-driver-on-linux.md
Last active August 18, 2022 20:20
How to install HP printer driver on linux especially on Linux Mint

This quick guid help you to Installing Linux priner driver on your machine, especialy for the HP Printers

To install HP printers driver on your Linux machine you should download and install hplib-xx-xx-xx.run from HP official website. to downloading proper package for your Linux machine following link could help you to find right distro.

https://developers.hp.com/hp-linux-imaging-and-printing/gethplip?language=en

NOTE: above link maybe changed during the time. if above link not exist. you should google hplip driver and find right link.

Setup and Installing :

To install hplib-xx-xx-xx.run please following these instruction :

@vheidari
vheidari / nodejs-dependencies-war.md
Last active August 20, 2022 08:11
OS Migration [ Codebase Migration ] - (Windows) -> (Linux) - NodeJs (npm) dependencies issue on Linux

Dependency in Development could make you crazy we have a little story about that

Recently, I develop a full website (Frontend and Backend) for my client and deliver it to my client. After that, I decide to change my development area from Windows to Linux.

After a couple of years, my client call with me and told me they want to update the project. I accepted it to add some feature that they need to add.

But during new setup the project on new machine (Linux) we encounter some interesting problems that I try to explain them in this article. I hope you will find it useful.

Frontend Dependency problems

On new machine (Linux) before I decide to updateing the project I just installed lastest version of nodejs and npm with nvm (node version mananger). current version in order for nodejs and npm are : (16.16.0) - ( 8.11.0 ).

@vheidari
vheidari / How-to-install-SerenityOS-on-Linux-Mint.md
Last active February 7, 2023 01:04
How to install SerenityOS On [ LINUX Mint - VERSION="20.3 (Una)" - Kernel : 5.15.0-33-generic ]

How to install SerenityOS On [ LINUX Mint - VERSION="20.3 (Una)" - Kernel : 5.15.0-33-generic ]

There are some instructions that can help you install and run "SerenityOS" on "Linux Mint"

First - Cloning Project :

-- git clone https://github.com/SerenityOS/serenity.git

Second, install a list of dependencies for this project :

Install Debian / Ubuntu dependencies

@vheidari
vheidari / HAYLOU-headphone-Fix-Linux-bad-quality-rate.md
Last active April 9, 2023 22:55
HAYLOU GT1 Pro headphone - How to fix bad quality rate output sound on the Linux

HAYLOU GT1 Pro headphone, and Linux output sound problem

If you have any problem with your bluetooth headphone on the Linux(Mint/Ubuntu base) this articel is for you especialy if you are use HEYLOU GT1 Pro. recently I bought one of them and it has some issuse on linux. it's connnect to my laptop bluetooth but output sound is terrible.

Well I did some research about it and this is my result:

I found a couple of posts on the web that they were discuss about a2dp_sink profile. that must set as output profile for bluethooth headphone. I check it but output profile for my bluethooth headphone was OK. if you want check output profile for your bluetooth device you could use this below command within your terminal :

pacmd list-sinks
@vheidari
vheidari / base64-encoder-decoder.sh
Last active May 9, 2023 16:38
Bash [ Commands / Scripts ] Tricks
#!/bin/bash
# Encoding and Decoding a string with Base64 command.
# Note: you cant pass string directly to Base64 in below example we pass string as output string with pipe.
# Note: $# holds numbers of argument that passed to ShellScript. inside function scope it also holds number of argumant that
# passed to function.
e64() {
if [[ $# == 0 ]]; then
echo ""
@vheidari
vheidari / Puppeteer.md
Last active May 9, 2023 16:41
Let's learn Puppeteer with some example :)

Puppeteer

In this article I wanna introduce Puppeteer as a tools that help us to do something cool like Web Scraping or Automation some task. Puppeteer helps developer up and run a google chromium browser throught command line tools this google chromium is headless browser that acting like real world browser. Puppeteer Api helps developer to do anyting that a user could do with it's browser. for example :

  • we could open and new page or new tab
  • we could select any element from DOM with it's api
  • we could typing and selection input element and manipulate them value
  • we could select a button and click on it
  • we could create a pdf from current page that
  • we could create a screenshot from current page
  • ...
@vheidari
vheidari / DLINK-ADSL-Modem-Firmware.md
Last active May 9, 2023 19:05
How to reverse engineering a D'LINK ADSL Modem Firmware - First version [Alpha] [maybe we have some english issues]
@vheidari
vheidari / compiling-jakt-programing-language.md
Last active July 17, 2023 00:35
Lets compile Jakt programing language compiler on the Linux

Lets compile Jakt programing language compiler on the Linux

Okey, today we work with Jakt.What is Jakt ? this is your answerd -> Jakt is a memory-safe systems programming language.it develop and maintain by Serenity OS team and today we would like to compile it and use it.

Who are the project maintainers?

The project maintainers at this time (Wed 10 May 2023 01:30:45 PM) are :

- @awesomekling, 
- @jntrnr, 
- @linusg,
  • @alimpfard,