Skip to content

Instantly share code, notes, and snippets.

View sushant-at-nitor's full-sized avatar
🖖
Focusing µS

Sushant Kulkarni sushant-at-nitor

🖖
Focusing µS
View GitHub Profile
@sushant-at-nitor
sushant-at-nitor / download-vs-code.sh
Last active May 13, 2018 10:29
Download specific version of VSCode
#Windows
#wget https://az764295.vo.msecnd.net/stable/7c7da59c2333a1306c41e6e7b68d7f0caa7b3d45/VSCodeSetup-x64-1.23.0.exe
wget https://az764295.vo.msecnd.net/stable/{latest-commit-in-version}/VSCodeSetup-{arch}-{version}.exe
#Mac
#wget https://az764295.vo.msecnd.net/stable/d0182c3417d225529c6d5ad24b7572815d0de9ac/VSCode-darwin-stable.zip
wget https://az764295.vo.msecnd.net/stable/{latest-commit-in-version}/VSCode-darwin-stable.zip
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
mongod --port <desired-port> --fork --auth --bind_ip_all --dbpath ~/mongodb/qa/db/ --logpath ~/mongodb/mongod.log >> ~/mongodb/log &
## You can check the process using following command:
# => ps -edaf | grep mongo | grep -v grep
@sushant-at-nitor
sushant-at-nitor / docker-reset.sh
Created July 23, 2019 18:04
Docker Reset / Docker clean slate / Docker Instance Clean Restart
# kill running containers
docker-compose down
# delete all containers
docker rm -f $(docker ps -a -q)
# Remove all the volumes
docker volume rm $(docker volume ls -q)
# up again
@sushant-at-nitor
sushant-at-nitor / get-install-packages.sh
Created January 15, 2020 15:16
List VSCode and Chocolaty packages to install later
## get list of vscode packages, which you can use to install later
code --list-extensions | % { "code --install-extension $_" }
## get list of choco packages, which you can use to install later
choco list --local-only | % { $_.split(' ')[0] } | % { "choco install -y $_" }
@sushant-at-nitor
sushant-at-nitor / android-wsl-setup.sh
Created April 1, 2020 14:27 — forked from jjvillavicencio/setup.sh
Install Android SDK on Windows Bash (WSL)
cd /home/<user>/
sudo apt-get install unzip
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
unzip sdk-tools-linux-4333796.zip -d Android
rm sdk-tools-linux-4333796.zip
sudo apt-get install -y lib32z1 openjdk-8-jdk
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/bin
printf "\n\nexport JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64\nexport PATH=\$PATH:\$JAVA_HOME/bin" >> ~/.bashrc
cd Android/tools/bin
@sushant-at-nitor
sushant-at-nitor / windows-terminal-settings.json
Created September 10, 2020 04:31
My Windows Terminal Config
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}",
"copyOnSelect": false,
"copyFormatting": false,
"alwaysShowTabs": true,
"profiles": {
"defaults": {
"colorScheme": "UbuntuLegit",
"backgroundImage": "C:\\Users\\<default-user>\\Pictures\\<picture-file>.jpg",
interface Tree {
[index: string]: number | Tree;
}
const getUniqueSortedNumbers = (tree: Tree, items: number[] = []): number[] => {
Object.keys(tree).map((key: string) =>
typeof tree[key] === 'object'
? getUniqueSortedNumbers(tree[key] as Tree, items)
: items.indexOf(tree[key] as number) <= 0 && items.push(tree[key] as number)
REM List the running distros
wsl --list -v
REM Shutdown all distros
wsl --shutdown
REM create a directory on a different drive (not necessary) to move the data
mkdir e:\system\docker\wsl-{distro}\
REM export the distro data to tar
@sushant-at-nitor
sushant-at-nitor / watchman-wsl.sh
Created January 17, 2022 04:10
install watchman on WSL Ubuntu distro
# install watchman on WSL Ubuntu distro
sudo apt-get install -y autoconf automake build-essential python2-dev pkg-config libtool
cd ~
git clone https://github.com/facebook/watchman.git -b v4.9.0 --depth 1
cd watchman
./autogen.sh
./configure --enable-lenient
make