Skip to content

Instantly share code, notes, and snippets.

View BuddhiLW's full-sized avatar

blw BuddhiLW

View GitHub Profile
@BuddhiLW
BuddhiLW / go
Created July 16, 2024 18:50
Install go programatically
#!/usr/bin/bash
GO_FILE=$(wget -O - https://go.dev/dl/ 2>/dev/null | sed -ne 's@.*\(\/go1\.[0-9]*\.[0-9]*\.linux-amd64\.tar\.gz\).*@\1@p' 2>&1 | head -n 1| tr -d /)
URL_DOWNLOAD="https://go.dev/dl/$GO_FILE"
echo "URL_DOWNLOAD=$URL_DOWNLOAD"
wget "$URL_DOWNLOAD"
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf $GO_FILE
@BuddhiLW
BuddhiLW / joypixels
Created July 16, 2024 18:50
Install joypixels font
#!/bin/bash
mkdir $DOTFILES/tmp && cd $DOTFILES/tmp
wget https://cdn.joypixels.com/arch-linux/font/7.0.0/joypixels-android.ttf
mv joypixels-android.ttf ~/.local/share/fonts/
fc-cache -vf
rm -rf $DOTFILES/tmp
@BuddhiLW
BuddhiLW / xwinwrap
Last active July 16, 2024 19:55
Install xwinwrap from source
#!/usr/bin/bash
if [ -z "$DOTFILES" ]; then
TMP=$(mktemp -d)
DELETE_TMP=true
else
TMP="$DOTFILES/gitthings/"
DELETE_TMP=false
fi
@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
@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 / 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 / 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 / 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 / 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 / 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