Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View vatz88's full-sized avatar
♟️

Vatsal Joshi vatz88

♟️
View GitHub Profile
@vatz88
vatz88 / git commands
Last active January 17, 2024 21:39
Helpful git commands
<!-- delete branch from github and locally -->
git push origin --delete <branch-name>
git branch -d <branch-name>
<!-- add remote to current branch -->
git branch --set-upstream-to <remote-name>
<!-- Undo last commit -->
git reset HEAD~
// ref: https://blog.pcrisk.com/mac/12377-how-to-find-out-your-ip-address-on-mac
ipconfig getifaddr en0
@vatz88
vatz88 / bulk-exec-command
Last active July 6, 2020 07:14
Recursively delete all files with particular extension
find . -name '*.coffee' \
-exec rm {} \;
// builk rename
// remove echo
for file in **/*.es6
do
echo mv "$file" "${file/.es6/}.js"
done
@vatz88
vatz88 / keybindings.json
Last active May 25, 2018 18:38
My VS Code User Settings
[
{
"key": "ctrl+`",
"command": "workbench.action.terminal.focus"
},
{
"key": "ctrl+`",
"command": "workbench.action.focusActiveEditorGroup",
"when": "terminalFocus"
},
@vatz88
vatz88 / BaseConverter.cpp
Last active June 4, 2022 00:47
C++ program to convert number from any given base to another.
/*
Vatsal Joshi
https://vatz88.in
*/
#include <iostream>
#include <math.h>
#include <string.h>
using namespace std;
atom-sync-settings
@vatz88
vatz88 / StickyFooter.css
Created October 28, 2016 09:29
CSS for sticky footer
/* A sticky footer always stays on the bottom of the page regardless of how little content is on the page. */
body {
display: flex;
min-height: 100vh;
flex-direction: column;
}
main {
flex: 1 0 auto;
@vatz88
vatz88 / FileEncryptDecrypt.cpp
Created September 2, 2016 18:19
C++ program to encrypt and decrypt text file by giving a pin or number password.
#include<iostream>
#include<conio.h>
#include<string>
#include<string.h>
#include<fstream>
#include<cstdlib>
using namespace std;
class passkey