Skip to content

Instantly share code, notes, and snippets.

View koter84's full-sized avatar

Dennis Koot koter84

View GitHub Profile
@koter84
koter84 / update_gitkraken.sh
Last active April 16, 2019 18:29
updater for GitKraken
#!/bin/bash
# get current dir
prog_dir="/opt/$(ls /opt/ | grep gitkraken | grep -v tar)"
if [ "$prog_dir" == "/opt/" ]
then
prog_dir=""
fi
echo "DIR: $prog_dir"
if [ -f $prog_dir/gitkraken ]
@koter84
koter84 / reverser.sh
Last active October 31, 2016 12:55
reverse the filename for the current dir
#!/bin/bash
if [ "$1" != "" ]
then
dir=$1
else
dir=$GIST_PWD
fi
cd "$dir"
@koter84
koter84 / truecolor.sh
Created July 25, 2016 14:04
test for true-color in the terminal
#!/bin/bash
awk 'BEGIN{
s="/\\/\\/\\/\\/\\"; s=s s s s s s s s;
for (colnum = 0; colnum<77; colnum++) {
r = 255-(colnum*255/76);
g = (colnum*510/76);
b = (colnum*255/76);
if (g>255) g = 510-g;
printf "\033[48;2;%d;%d;%dm", r,g,b;
@koter84
koter84 / update_teamviewer.sh
Last active February 21, 2017 10:17
download the stand-alone version of teamviewer and link the desktop-file
#!/bin/bash
# get current dir
prog_dir="/opt/$(ls /opt/ | grep teamviewer | grep -v tar)"
if [ "$prog_dir" == "/opt/" ]
then
prog_dir=""
fi
echo "DIR: $prog_dir"
if [ -f $prog_dir/teamviewer ]
@koter84
koter84 / update_arduino.sh
Last active December 27, 2017 22:30
Install Arduino-IDE
#!/bin/bash
# get current dir
arduino_dir="/opt/$(ls /opt/ | grep arduino | grep -v tar)"
if [ "$arduino_dir" == "/opt/" ]
then
arduino_dir=""
fi
echo "Arduino DIR: $arduino_dir"
arduino_dir_version=$(echo $arduino_dir | sed 's/.*arduino-//')
@koter84
koter84 / speedtest.sh
Last active June 30, 2022 05:30
do a simple speedtest from commandline
#!/bin/bash
links=(
"http://mirror.nl.leaseweb.net/speedtest/1000mb.bin"
"http://download.xs4all.nl/test/1GB.bin"
"http://ftp.snt.utwente.nl/pub/test/1000M"
"http://www.colocenter.nl/speedtest/1000mb.bin"
"http://speed.transip.nl/1000mb.bin"
"http://mirror.widexs.nl/ftp/pub/speed/1000mb.bin"
"http://mirror.nforce.com/pub/speedtests/1000mb.bin"
@koter84
koter84 / update_remmina.sh
Last active July 5, 2018 07:25
update remmina from git
#!/bin/bash
##### UNINSTALL #####
if [ -f /etc/ld.so.conf.d/freerdp_devel.conf ]
then
read -p "uninstall git-version ? [y/N] " do_uninstall
if [ "$do_uninstall" == "Y" ] || [ "$do_uninstall" == "y" ]
then
echo "do-uninstall!"
rm -rf /opt/remmina_build/
@koter84
koter84 / update_komodo_edit.sh
Last active July 18, 2018 08:46
update your komodo-edit-9 install
#!/bin/bash
# set the major version
komodo_major_version="11"
# check for older version
if [ -d "/opt/Komodo-Edit-9" ]
then
old_version="9"
fi
@koter84
koter84 / update_robomongo.sh
Last active July 14, 2017 13:51
update RoboMongo
#!/bin/bash
# get current dir
robomongo_dir="/opt/$(ls /opt/ | grep robomongo-)"
echo "RoboMongo DIR: $robomongo_dir"
robomongo_dir_version=$(echo $robomongo_dir | awk -F/ '{print $(NF)}' | sed s/'robomongo-'//)
echo "RoboMongo DIR Version: $robomongo_dir_version"
# get current url
robomongo_url=$(curl -s https://robomongo.org/download/ | sed 's/<a/\n<a/g' | grep '\.tar\.gz' | grep -v 'days for public availability' | head -n1 | sed 's/.*http/http/g' | cut -d"\"" -f1)
@koter84
koter84 / update_studio3t.sh
Last active March 30, 2017 15:44
MongoChef install-updater
#!/bin/bash
# deprecated MongoChef
depr_dir="/opt/$(ls /opt/ | grep mongochef-)"
if [ -d "$depr_dir" ] && [ "$depr_dir" != "/opt/" ]
then
echo "Found deprecated MongoChef [$depr_dir]"
rm -rf "$depr_dir"
if [ -h /opt/mongochef ]
then