Skip to content

Instantly share code, notes, and snippets.

View zsoumya's full-sized avatar

Soumya Mukherjee zsoumya

  • Charlotte, NC
  • 23:20 (UTC -12:00)
View GitHub Profile
@zsoumya
zsoumya / fix-wsl2-dns-resolution
Created November 9, 2020 07:44 — forked from coltenkrauter/fix-wsl2-dns-resolution
Fix DNS resolution in WSL2
1. Create a file: /etc/wsl.conf.
2. Put the following lines in the file in order to ensure the your DNS changes do not get blown away
[network]
generateResolvConf = false
3. In a cmd window, run wsl --shutdown
4. Restart WSL2
5. Create a file: /etc/resolv.conf. If it exists, replace existing one with this new file.
6. Put the following line in the file
@zsoumya
zsoumya / dailyprompt.ps1
Created May 6, 2019 14:06 — forked from jdhitsolutions/dailyprompt.ps1
An enhanced PowerShell prompt function that incorporates some of my other PowerShell modules to provide a daily management experience.
#requires -version 5.1
<#
The complete version of the function also requires additional modules
which can be downloaded from the PowerShell Gallery.
https://github.com/jdhitsolutions/PSCalendar
https://github.com/jdhitsolutions/myTickle
If you prefer to
@zsoumya
zsoumya / BoxPrompt2.ps1
Created May 6, 2019 14:06 — forked from jdhitsolutions/BoxPrompt2.ps1
A variation on my PowerShell box prompt. This should work cross-platform on PowerShell Core.
#requires -version 5.1
<#
This is a variation of the BoxPrompt code you can find at https://gist.github.com/jdhitsolutions/df808116f9234c070bdaf233418ec59b
Create a lined box with user and location information. The line color will indicate if the user is running elevated.
The prompt will also display the current date and time and a PS prompt with the PowerShell version.
┌───────────────────────┐
│ [BOVINE320\Jeff] C:\ │
@zsoumya
zsoumya / tmux-cheatsheet.markdown
Created April 11, 2019 15:19 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@zsoumya
zsoumya / show-256-colors.sh
Created April 11, 2019 14:15 — forked from ivanbrennan/show-256-colors.sh
Use Bash to show all 256 colors supported by xterms
#!/usr/bin/env bash
PADDING='Padding'
main() {
local xterm_start=0 \
xterm_width=8 \
xterm_height=2
local cube_start=$((xterm_start + xterm_width * xterm_height)) \
@zsoumya
zsoumya / show-all-256-colors.py
Created April 11, 2019 14:14 — forked from mgedmin/show-all-256-colors.py
Script to show all 256 colors supported by xterms
#!/usr/bin/python
"""Print a swatch using all 256 colors of 256-color-capable terminals."""
__author__ = "Marius Gedminas <[email protected]>"
__url__ = "https://gist.github.com/mgedmin/2762225"
__version__ = '2.0'
def hrun(start, width, padding=0):