Skip to content

Instantly share code, notes, and snippets.

@lukewhrit
Last active July 16, 2020 04:03
Show Gist options
  • Save lukewhrit/3a30e079e8692cc09776186014090835 to your computer and use it in GitHub Desktop.
Save lukewhrit/3a30e079e8692cc09776186014090835 to your computer and use it in GitHub Desktop.
These scripts are meant to be ran with qsr.
#!/bin/sh
FILE=$HOME/.editorqonfig
EDQF=$(cat << "eof"
root = true
[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
[*.md]
trim_trailing_whitespace = false
eof
)
if [ -f "$FILE" ]; then
$FILE > .editorconfig &&
echo "✔️ Sucesfully created .editorconfig file from ~/.editorqonfig" ||
echo "❌ Couldn't create .editorconfig file for some reason"
else
echo "$EDQF" > .editorconfig &&
echo "✔️ Sucesfully created .editorconfig file" ||
echo "❌ Couldn't create .editorconfig file for some reason"
fi
a_flag=''
b_flag=''
files=''
verbose='false'
print_usage() {
printf "Usage: ..."
}
while getopts 'abf:v' flag; do
case "${flag}" in
a) a_flag='true' ;;
b) b_flag='true' ;;
f) files="${OPTARG}" ;;
v) verbose='true' ;;
*) print_usage
exit 1 ;;
esac
done
# Add Signal Desktop PPA & Install for Debian-based systems
curl -s https://updates.signal.org/desktop/apt/keys.asc | sudo apt-key add -
echo "deb [arch=amd64] https://updates.signal.org/desktop/apt xenial main" | sudo tee -a /etc/apt/sources.list.d/signal-xenial.list
sudo apt update && sudo apt install signal-desktop
# Add repositories
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
# Update & install via apt
sudo apt update && sudo apt install yarn
sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-* mysql-client-core-*
sudo rm -rf /etc/mysql /var/lib/mysql
sudo apt-get autoremove
sudo apt-get autoclean

scripts

Collection of scripts to be ran via qsr.

Running

$ qsr run 324Luke [script (ie ts-starter.sh)]
# or
$ qsr run 3a30e079e8692cc09776186014090835 [script (ie ts-starter.sh)]

Files

  • remove-mysql.sh - Completely removes a MySQL install with apt
  • ts-starter.sh - Clones my typescript project boilerplate repository for easy use.
  • ts-starter.bat - Batchfile version of ts-starter.sh
  • install-yarn.sh - Install the yarn package manager
  • flags-test.sh - Testing flags in sh
  • editorqonfig.sh - QSR version of https://github.com/lukewhrit/editorqonfig/
@echo off
echo Requires yarn, nodejs, and git
git clone https://github.com/324Luke/typescript-starter.git ts-starter
cd ts-starter
yarn install
echo "Requires yarn, nodejs, & git"
git clone https://github.com/324Luke/typescript-starter.git ts-starter # Clone from github
cd ts-starter # Change directory into project
yarn install # Use yarn to install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment