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 / 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
Afghanistan
Albania
Algeria
Andorra
Angola
Antigua & Deps
Argentina
Armenia
Australia
Austria
@vheidari
vheidari / docker command
Last active April 3, 2020 23:35
Quick docker command with example
download an image from docker hub :
docker pull hello-world
-------------------------------------
running or creating a process or container from an image:
docker run nginx
-------------------------------------
show list of process:
docker ps
show list of latests process with -a [archive] switch
@vheidari
vheidari / stop-auto-update-resolve.conf.txt
Last active April 1, 2020 23:36
[ubuntu] : stop auto update name server in /etc/resolve.conf
[Command] :
1. sudo apt-get install dnsmasq
2. sudo apt-get install network-manenger
----------------------------------------------------------
[Solution[one]] :
1. nano /etc/dnsmasq.conf
2. add dns server ip in dnsmasq.conf :
-ex :server=ipaddress
server=8.8.8.8
server=8.1.8.1

Keybase proof

I hereby claim:

  • I am vheidari on github.
  • I am vheidari (https://keybase.io/vheidari) on keybase.
  • I have a public key ASD53i-qUAbKhv-KgnUiP67iCyvddJsvVEuz8SL87tzLvgo

To claim this, I am signing this object:

@vheidari
vheidari / rename.py
Created September 7, 2019 21:54
rename and numbering files with python.
import os
import shutil
fileNames = ["one", "two", "three"]
i = 1
for fileName in fileNames:
srcName = "./" + fileName
destName = "./dest/" + str(i) + "." + fileName