Skip to content

Instantly share code, notes, and snippets.

View riazul701's full-sized avatar

Md. Riazul Hasan Rahat riazul701

View GitHub Profile
@riazul701
riazul701 / WSL2GUIXvnc-en.md
Created August 5, 2024 14:03 — forked from tdcosta100/WSL2GUIXvnc-en.md
A tutorial to use GUI in WSL2 replacing original XServer by Xvnc, allowing WSL to work like native Linux, including login screen

WSL2 with GUI using Xvnc

Note

If you want to use pure WSLg, you can try the new WSLg (XWayland) tutorial or the WSLg (Wayland) tutorial.

In this tutorial, we will setup GUI in WSL2, and access it using VNC. No additional software outside WSL (like VcXsrv) is required, except, of course, a VNC Viewer (RealVNC, TightVNC, TigerVNC, UVNC, etc, all of them might work flawlessly).

The key component we need to install is the desktop metapackage you want (GNOME, KDE, Xfce, Budgie, etc) and tigervnc-standalone-server.

For this setup, I will use Ubuntu (20.04, 22.04 and 24.04 are working), and install GNOME Desktop. Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. Check the [Sample

@riazul701
riazul701 / keybindings.json
Created July 29, 2024 13:59 — forked from colinaaa/keybindings.json
LunarVim VSCode Config
// Place your key bindings in this file to override the defaults
[
{
"command": "vscode-neovim.compositeEscape1",
"key": "j",
"when": "neovim.mode == insert && editorTextFocus",
"args": "j"
},
{
"command": "vscode-neovim.compositeEscape2",
@riazul701
riazul701 / google-apps-script.md
Created February 10, 2024 19:20 — forked from labnol/google-apps-script.md
How to Learn Google Apps Script

Learning Google Apps Script

Find the best resources for learning Google Apps Script, the glue that connects all GSuite services including Gmail, Google Drive, Calendar, Google Sheets, Forms, Maps, Analytics and more.

A good place to learn more about Google Apps Script is the official documentation available at developers.google.com. Here are other Apps Script resources that will help you get up to speed.

  1. Google Apps Script Code Samples by Amit Agarwal
  2. Google Apps Script Development - Create Google Apps Script projects locally inside VS Code - video tutorial
  3. Awesome Google Scripts by Amit Agarwal
  4. Google Developer Experts - Follow Apps Scr
Home/Core TX9XD-98N7V-6WMQ6-BX7FG-H8Q99
Home/Core (Country Specific) PVMJN-6DFY6-9CCP6-7BKTT-D3WVR
Home/Core (Single Language) 7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH
Home/Core N 3KHY7-WNT83-DGQKR-F7HPR-844BM
Professional W269N-WFGWX-YVC9B-4J6C9-T83GX
Professional N MH37W-N47XK-V7XM9-C7227-GCQG9
Professional Enterprise
Professional Workstation
Enterprise NPPR9-FWDCX-D2C8J-H872K-2YT43
Enterprise N DPH2V-TTNVB-4X9Q3-TJR4H-KHJW4
@riazul701
riazul701 / Embedded Python in BASH
Created October 19, 2023 20:11 — forked from welbornprod/Embedded Python in BASH
A little trick to embed python code in a BASH script.
#!/bin/bash
# Here are some embedded Python examples using Python3.
# They are put into functions for separation and clarity.
# Simple usage, only using python to print the date.
# This is not really a good example, because the `date`
# command works just as well.
function date_time {
@riazul701
riazul701 / escape_double_quotes.sh
Created October 18, 2023 10:42 — forked from miguelmota/escape_double_quotes.sh
Bash sed escape double quotes
$ echo '{"foo":"bar"}'| sed s/\"/'\\\"'/g
# {\"foo\":\"bar\"}
@riazul701
riazul701 / README.md
Created September 30, 2023 16:49 — forked from almoore/README.md
Getting realtime output using Python Subprocess
@riazul701
riazul701 / git-for-win_Pacman_Install.md
Created September 24, 2023 06:33 — forked from adojos/git-for-win_Pacman_Install.md
Git: Pacman Installation on Git For Windows #git

Git For Windows (GitBash) Pacman Installation

The 'Git for Windows' by default does not come with MSYS2 package manager called 'Pacman' and hence it is a limited version or subset of the MSYS2. Also the bash which supplied wih 'Git for Windows' is not a full version of bash hence does not provide for full Linux environment.

However you can get package manager support inside 'Git for Windows' in following ways :

  1. Install full MSYS2 and build Git for Windows yourself (Most git users don't require all packages and MSYS2)
  2. Install Git for Windows SDK (heavy & consumes around 3-5 Gb space)
  3. Use a hack to merge the MSYS2 Pacman packages with your existing Git for Windows installation
@riazul701
riazul701 / curl.md
Created September 19, 2023 18:32 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.