Skip to content
View drdixit's full-sized avatar
  • Open to Opportunities
  • Gujarat, India
  • YouTube @drdixit6

Block or report drdixit

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
drdixit/README.md

(•ᴥ•)ゞ   Salutations!
  /|\
  / \


⚠️ Warning: "user your credentials, paths and everything"

Windows 11 Cheat Sheet

powershell config

Location ~ C:\Users\user\Documents\PowerShell\Microsoft.PowerShell_profile.ps1 If not already exist create it
Ex whereis git and it returns path of node C:\Users\user\scoop\shims\git.exe
Useful for checking like if you have two exes are installed on the system like which one is currently in use.

function whereis ($command) {
	Get-Command -Name $command -ErrorAction SilentlyContinue |
	Select-Object -ExpandProperty Path -ErrorAction SilentlyContinue
}

change the default prompt

function prompt {
    $esc = [char]27
    $reset = "$esc[0m"
    $cyan = "$esc[36m"
    $green = "$esc[32m"
    $red = "$esc[31m"
    $yellow = "$esc[33m"

    $currentPath = Get-Location
    $gitBranch = ''
    $gitStatus = ''

    if (Test-Path .git) {
        $gitBranch = git rev-parse --abbrev-ref HEAD 2>$null
        $statusOutput = git status --porcelain 2>$null
        if ($statusOutput) {
            $gitStatus = '*'
        }
    }

    "$cyan$currentPath $green$gitBranch$gitStatus$yellow$reset "
}

go here install scoop and git
quick tip i installed git with winget --scope machine and its giving me problems i have to use sudo + inline to work and sometimes it didn't even work.
feture self please use scoop for git
admin and scope user both have different execuation policies setup wisely.
this thig is also useful for nodejs like script execution disabled or something.
Current execution policy check

Get-ExecutionPolicy

Set Execution Policy

Set-ExecutionPolicy unrestricted

Git section

generate the keys

ssh-keygen -t ed25519 -C "[email protected]"

set username globally

git config --global user.name "Dixit"

set email globally

git config --global user.email "[email protected]"

Tells Git to use SSH keys (not GPG) for commit signing.

git config --global gpg.format ssh

Sets the public SSH key file you want Git to use for signing commits. Replace the path if your key is elsewhere.

git config --global user.signingkey C:\Users\user\.ssh\id_ed25519.pub

Makes Git sign all commits by default, so you don’t have to add -S every time.

git config --global commit.gpgsign true

Not Mandatory but you can do this
Some Windows Things (Run Powershell as Admin)
This ensures the ssh-agent starts every time you log into Windows

Get-Service ssh-agent | Set-Service -StartupType Automatic

Currently start ssh agent service

Start-Service ssh-agent

Add your keys to ssh-agent (after pasting try hitting with tab does it autocomplete to absolute path)

ssh-add %USERPROFILE%\.ssh\id_ed25519

Verify the key is loaded

ssh-add -l

ASCI Section

Char Code Size Width
  ─ ─
  ─ ─ ~1/5 space
  ─ ─ Very thin
  ─ ─ Slightly thinner than  

Pinned Loading

  1. php-mysql php-mysql Public

    PHP MySQL Template (ToDo App)

    PHP

  2. (Run This as Administrator) This scr... (Run This as Administrator) This script recursively identifies all .exe files in the current directory and its subdirectories and creates Windows Firewall rules to block internet access for each executable.
    1
    @ setlocal enableextensions 
    2
    @ cd /d "%~dp0"
    3
    
                  
    4
    for /R %%f in (*.exe) do (
    5
      netsh advfirewall firewall add rule name="Blocked: %%f" dir=in program="%%f" action=block
  3. Add this to .bashrc Add this to .bashrc
    1
    # get current branch in git repo
    2
    function parse_git_branch() {
    3
    	BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
    4
    	if [ ! "${BRANCH}" == "" ]
    5
    	then
  4. dixit.dev dixit.dev Public

  5. Windows Cheat Sheet Windows Cheat Sheet
    1
    # ⚠️ Warning: "user your credentials, paths and everything"
    2
    
                  
    3
    [go here install scoop and git](https://scoop.sh/)<br>
    4
    quick tip i installed git with winget --scope machine and its giving me problems i have to use sudo + inline to work and sometimes it didn't even work.<br>
    5
    feture self please use scoop for git<br>