Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Mohit Thakral mohitt

🎯
Focusing
Block or report user

Report or block mohitt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mohitt
mohitt / setup-windows.ps1
Created Feb 25, 2020
Setting up windows
View setup-windows.ps1
choco install -y vsvim
choco install -y resharper
choco install -y vscode
choco install -y jetbrains-resharper
choco install -y golang
# restart terminal
go get github.com/pcarrier/gauth
# get the gauth.csv file from .config folder to copy paste
choco install -y microsoft-windows-terminal
@mohitt
mohitt / _vsvimrc-resharper
Last active Feb 14, 2020
_vsvimrc_resharper
View _vsvimrc-resharper
let mapleader="\<space>"
set clipboard=unnamed
nnoremap <leader>j :vsc Window.PreviousTab<CR>
nnoremap <leader>k :vsc Window.NextTab<CR>
nnoremap <leader>r :vsc Resharper.Resharper_GotoRecentFiles<CR>
nnoremap <leader>e :vsc Resharper.Resharper_GotoType<CR>
nnoremap <leader>f :vsc Resharper.Resharper_GotoFile<CR>
nnoremap <leader>d :vsc File.Close<CR>
@mohitt
mohitt / command.pwsh
Created Jan 8, 2020
Get process id for port
View command.pwsh
Get-Process -Id (Get-NetTCPConnection -LocalPort 5050).OwningProcess
View idea vim
let mapleader=" "
nnoremap <Leader>ve :e c:\users\mohit.thakral\.ideavimrc<CR>
nnoremap <Leader>vl :source c:\users\mohit.thakral\.ideavimrc<CR>
set clipboard=unnamedplus,unnamed
set nu
set rnu
set is
"
nmap <Leader>f :action GotoFile<CR>
nmap <Leader>s :action FileStructurePopup<CR>
View another displayplacer.sh
displayplacer "id:0E0042C0-B227-4AD6-015B-5AF8116D137F res:1920x1080 hz:60 color_depth:4 scaling:off origin:(0,0) degree:0" "id:17E22855-A931-833E-8314-5CE8FFA63380 res:1920x1080 hz:60 color_depth:4 scaling:off origin:(0,-1080) degree:0" "id:D9534633-F47D-42FF-FA84-857343474BE8 res:1920x1080 hz:60 color_depth:4 scaling:off origin:(-1920,0) degree:0" "id:2131DD01-FB84-952C-5F7B-02BEEF31621F res:1920x1080 hz:60 color_depth:4 scaling:off origin:(-1920,-1080) degree:0"
@mohitt
mohitt / Powershell
Last active Dec 3, 2019
Delete All Windows Temp files
View Powershell
Set-Location “C:\Windows\Temp”
Remove-Item * -recurse -force
Set-Location “C:\Windows\Prefetch”
Remove-Item * -recurse -force
Set-Location “C:\Documents and Settings”
Remove-Item “.\*\Local Settings\temp\*” -recurse -force
Set-Location “C:\Users”
View .ideavimrc
let mapleader=" "
nnoremap <Leader>ve :e ~/.ideavimrc<CR>
nnoremap <Leader>vl :source ~/.ideavimrc<CR>
set clipboard=unnamedplus,unnamed
set nu
set rnu
set is
"
nmap <Leader>f :action GotoFile<CR>
nmap <Leader>s :action FileStructurePopup<CR>
View webstrom actions
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb
$SelectAll <M-A>
$Undo <M-Z>
View webpack.dev.js
,
headers: {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods":
"GET, POST, PUT, DELETE, PATCH, OPTIONS",
"Access-Control-Allow-Headers":
"X-Requested-With, content-type, Authorization"
}
View SendGrid-Email.sh
export SENDGRID_API_KEY='YOUR_API_KEY'
curl --request POST \
--url https://api.sendgrid.com/v3/mail/send \
--header "Authorization: Bearer $SENDGRID_API_KEY" \
--header 'Content-Type: application/json' \
--data '{"personalizations": [{"to": [{"email": "test@example.com"}]}],"from": {"email": "test@example.com"},"subject": "Sending with SendGrid is Fun","content": [{"type": "text/plain", "value": "and easy to do anywhere, even with cURL"}]}'
You can’t perform that action at this time.