Skip to content

Instantly share code, notes, and snippets.

View BuddhiLW's full-sized avatar

blw BuddhiLW

View GitHub Profile
@BuddhiLW
BuddhiLW / tor-browser
Created July 23, 2024 18:47
Install latest Tor Browser version
#!/usr/bin/bash
# Change to the target directory
cd "$DOTFILES/gitthings" || exit 1
# Scrape the Tor Project page to find the latest stable version
version=$(curl -s https://dist.torproject.org/torbrowser/ | grep -oP '(?<=href=")[0-9]+\.[0-9]+\.[0-9]+(?=/")' | sort -V | tail -n 1)
# Check if the version was found
if [ -z "$version" ]; then
@BuddhiLW
BuddhiLW / lc0
Created July 16, 2024 22:16
Install LC0
#!/bin/bash
### PRE-REQUISITE: CUDA
# https://developer.nvidia.com/cuda-downloads
### The directory you want to install LC0 at:
cd $DOTFILES/gitthings/
git clone -b release/0.29 --recurse-submodules https://github.com/LeelaChessZero/lc0.git
cd lc0
@BuddhiLW
BuddhiLW / nibbler
Created July 16, 2024 22:06
Install nibbler from source
#!/bin/bash
cd $DOTFILES/gitthings/
if ! [ -e $PWD/nibbler ]; then
git clone https://github.com/rooklift/nibbler.git
fi
NIBBLER_PATH="$PWD/nibbler"
path_file="/usr/local/bin/nibbler"
@BuddhiLW
BuddhiLW / electron
Created July 16, 2024 21:54
Install electron and permission to run sandbox
#!/usr/bin/bash
sudo npm install -g electron
sudo chown root:root /usr/local/lib/node_modules/electron/dist/chrome-sandbox
sudo chmod 4755 /usr/local/lib/node_modules/electron/dist/chrome-sandbox
@BuddhiLW
BuddhiLW / install-nerd-fonts
Created July 16, 2024 21:18
Install (all) nerdfonts -- can take a while
#!/usr/bin/bash
cd $DOTFILES/gitthings/
git clone https://github.com/ryanoasis/nerd-fonts.git
cd nerd-fonts
./install.sh
@BuddhiLW
BuddhiLW / st
Created July 16, 2024 19:50
Install my st build
#/usr/bin/bash
GITT=$DOTFILES/gitthings
git clone https://github.com/BuddhiLW/st.git $GITT/st
cd $GITT/st
sudo make install
@BuddhiLW
BuddhiLW / ble
Created July 16, 2024 19:47
Install ble.sh -- autocomplete replacement for terminals written in bash itself
#!/usr/bin/bash
BPATH="$HOME/dotfiles/gitthings/ble.sh"
rm -rf $BPATH
git clone --recursive https://github.com/akinomyoga/ble.sh.git $BPATH
cd $BPATH
make
@BuddhiLW
BuddhiLW / buf
Created July 16, 2024 19:46
Install buf (protobuf related tool -- gRPC)
#!/usr/bin/bash
if [ -n $(command -v brew) ]
then
echo "Brew is installed"
echo "Continuing with brew-buf install"
brew install bufbuild/buf/buf
else
echo "Brew not installed"
@BuddhiLW
BuddhiLW / postman
Created July 16, 2024 19:45
Install Postman
#!/bin/bash
# Download and extract the file, and capture the output of tar
output=$(wget -qO- https://dl.pstmn.io/download/latest/linux_64 | tar xzvf - 2>&1)
status=$?
# Check if the command was successful
if [ $status -eq 0 ]; then
echo "Download and extraction successful."
echo "$output" # Print the captured output if needed
@BuddhiLW
BuddhiLW / android
Created July 16, 2024 19:44
Install Android Studio and the emulator command
#!/bin/bash
## Dependencies
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
## Where you would like to install the Android Stufio
cd $DOTFILES/gitthings/
wget https://redirector.gvt1.com/edgedl/android/studio/ide-zips/2023.2.1.24/android-studio-2023.2.1.24-linux.tar.gz