Skip to content

Instantly share code, notes, and snippets.

View sirius-beck's full-sized avatar

Sirius Beck sirius-beck

  • Rio de Janeiro, Brazil
View GitHub Profile
@sirius-beck
sirius-beck / dont-translate-any-code.md
Last active April 9, 2024 14:54
Stop browser from translating any code in the page.

Don't Translate Any Code

Stop browser from translating any code in the page.

Usage

Browser's URL Bar

Type javascript: in the browser's url bar, paste the following code and press enter.

VS Code Settings

My personal VS Code settings and keybindings

Settings

Open your profile's settings.json file and paste the contents of this gist

ctr/cmd + shift + P > Preferences: Open User Settings (JSON)

@sirius-beck
sirius-beck / hide_icon.reg
Created January 26, 2024 15:29
Remove WSL icon from desktop
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel]
"{B2B4A4D1-2754-4140-A2EB-9A76D9D7CDC6}"=dword:00000001
@sirius-beck
sirius-beck / install.sh
Created January 21, 2024 02:24
Install yarn in WSL
#!/bin/bash
### Uncomment the line below to install Node.js if not already installed
# sudo apt-get install nodejs
### Install Yarn
sudo apt update
sudo apt install curl
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
@sirius-beck
sirius-beck / get_win_user_password.cmd
Last active September 26, 2023 13:41
Gets the windows user's password and runs a script when the correct password is entered
powershell $currentUser = [System.Security.Principal.WindowsIdentity]::GetCurrent()
powershell $userSID = $currentUser.User.Value
:prompt
powershell $cred = $host.ui.promptforcredential('Failed Authentication', '', [Environment]::UserDomainName+'\'+[Environment]::UserName, [Environment]::UserDomainName).GetNetworkCredential().Password
powershell $adsi = [ADSI]"WinNT://$env:USERDOMAIN/$env:USERNAME,user"
powershell $adsiPass = $adsi.InvokeGet("Password")
powershell $adsiPassToStr = [System.Text.Encoding]::Unicode.GetString($adsiPass)