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 / GitHub-ssh-access-token.md
Last active July 12, 2022 10:24
Github - Creating a personal access token and add token authentication to github

Github Added token authentication requirements for Git operations in july 2021

Following instruction help us to generating ssh token and add it to github then working with ssh rather than https.

For more information plase read this blog post : MoreInfo


Purpose :

@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 / vim-cheat-sheet.md
Last active July 10, 2022 14:47
Useful Vim Cheat Sheet
  1. Change to editor mode : [ i ]
  2. Chagne to viewer mode : [ esc ]
  3. Select multi line of code : [ v ]
  4. Cut multi line of code : [ x ]
  5. Past cuted or copied lines : viewer mode -> [ p ]
  6. Search and replace a word inside file : viewer mode -> [ :s/word/replace ]
  7. Search and replace a all word inside file : viewer mode -> [ :%s/word/replace ]
  8. Delete a word in viewer mode : viewer mode -> [ d ] -> [ e ]
  9. Delete multi word in viewer mode : viewer mode -> [ d ] -> [ number] -> [ e ]
  10. Delete a char in viewer mode : viewer mode -> [ d ] -> [ right arrow ]
@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 / webptopng.bat
Last active March 29, 2022 09:18
Webp format to Png with Windows batch script and dwebp.exe
@echo off
set list=*.webp
(for %%a in (%list%) do (
dwebp.exe %%a -o %%a.png
))
echo "All .webp file converted to .png"
@vheidari
vheidari / git-tips
Created May 28, 2021 12:05
📌 Git Quick Tips :
GIT INIT :
= Add new repositry in local machin
- `git init`
=======================================================
GIT ADD :
= Add files to git track them
- `git add .`
- `git add -A`
@vheidari
vheidari / msys2-curl-ssl-issus.txt
Last active May 4, 2021 10:34
MSYS2 - Curl ssl certification problems
#Add pem.sh script part in ~/bash/pem.sh
#----------------------------------------------------------------------------
#Start pem.sh script
#----------------------------------------------------------------------------
#cacert.pem name
CERT=cacert.pem
echo "Start fix curl ssl Certificat issus !"
@vheidari
vheidari / msys2-set-prroxy.txt
Last active January 19, 2024 06:23
MSYS2 - How to set proxy settings in msys2
# Add below lines to the profile in : /etc/profile
# Proxy Setting
export HTTP_PROXY="IpAddress:Port" # Like: 127.0.0.1:1477
export HTTPS_PROXY=$HTTP_PROXY
export http_proxy=$HTTP_PROXY
export https_proxy=$HTTP_PROXY
@vheidari
vheidari / download-install-wsl-linux.txt
Last active December 6, 2023 08:30
how to download and install manually wsl2, and linux distor on windows
Manually download Windows Subsystem for Linux distro packages:
# @link: https://docs.microsoft.com/en-us/windows/wsl/install-manual#installing-your-distro
Windows Subsystem for Linux Installation Guide for Windows 10:
# @link: https://docs.microsoft.com/en-us/windows/wsl/install-win10#set-your-distribution-version-to-wsl-1-or-wsl-2
Updating Wsl :
Download Msi Wsl update package from below link then install it :
@link : https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi