Skip to content

Instantly share code, notes, and snippets.

View filipsPL's full-sized avatar
💭
🚀 travelling to Mars and back

filips filipsPL

💭
🚀 travelling to Mars and back
View GitHub Profile
@filipsPL
filipsPL / README.md
Created June 15, 2020 11:49
[solved] Unable to start h2o AI java jar: Boot class path mechanism is not supported

the problem

when running h2o.ai:

java -jar h2o.jar

there is an error:

06-15 13:26:18.086 192.168.12.198:54321 19409 main INFO: ----- H2O started -----
@filipsPL
filipsPL / README.md
Created June 6, 2020 06:44
rsync transfer data munin plugin - debian 10

rsync transfer data munin plugin - debian 10

For new installations the provided rsync_bytes plugin doesn't work. Here is rewrittend (and path-hardcoded) version which does work.

Please remember that the rsync logfile must be outside the /home directory, see here

Before use, install logtail.

@filipsPL
filipsPL / remove-sdf-fields.sh
Created April 22, 2020 14:08
Remove all fields from the sdf structural file with sed in bash
#!/bin/bash
cat input.sdf | sed '/M END/,/$$$$/{//!d}' > input-fields-removed.sdf
@filipsPL
filipsPL / README.md
Created April 21, 2020 08:46
Send form data (with files) using curl

Send form data (with files) using curl

Many recepies for sending data with curl via POST method didn't work for me. Eg, this was not working for me:

🔴

curl -F ‘data=@path/to/local/file’ UPLOAD_ADDRESS

(as advised for example here)

@filipsPL
filipsPL / check_and_connect_vpn.sh
Created April 16, 2020 07:22
Bash check if a VPN connection is active, if not - connect!
#!/bin/bash
vpnConnectionName="my vpn connection"
if nmcli c show --active | grep -q "$vpnConnectionName"; then
echo "$vpnConnectionName connection is up"
else
echo "$vpnConnectionName connection is down, let's connect"
nmcli con up id "$vpnConnectionName"
sleep 4s
@filipsPL
filipsPL / get-and-compile.sh
Created March 30, 2020 07:43
Debian/Ubuntu: update pymol repo and (re)compile
#!/bin/bash -e
# Single time - install packages, clone repos
# apt-get install git build-essential python3-dev libglew-dev \
# libpng-dev libfreetype6-dev libxml2-dev \
# libmsgpack-dev python3-pyqt5.qtopengl libglm-dev libnetcdf-dev
# git clone --depth=1 https://github.com/schrodinger/pymol-open-source.git
# git clone --depth=1 https://github.com/rcsb/mmtf-cpp.git
@filipsPL
filipsPL / dialog-show-cron.sh
Created January 10, 2020 08:55
How to use kdialog from cron-started jobs.
#!/bin/bash
export DISPLAY=:0
kdialog --title "Borg backup done $(date +"%A %x")" --passivepopup "<pre>$(cat /home/user/backup.log)</pre>" 10s
@filipsPL
filipsPL / tcx-polar2garmin.sh
Created December 29, 2019 19:39
Bash command line convert Polar tcx file to Garmin acceptable tcx file
#!/bin/bash
#see: https://forums.garmin.com/apps-software/mobile-apps-web/f/garmin-connect-web/83432/polar-flow-tcx-export-to-garmin-connect
cat polar.tcx | sed -e '/<Creator/,/<\/Creator>/d' -e '/<Author/,/<\/Author>/d' > garmin.tcx
@filipsPL
filipsPL / rdock-conda-install.sh
Created December 23, 2019 19:47
install rdock ubuntu under conda environment
# install miniconda, then:
# create new environment
conda create -n docking-rdock
# activate it!
conda activate docking-rdock
# add channels
@filipsPL
filipsPL / doWekaGridSearch.sh
Created October 17, 2019 14:43
A shell script for running grid search in weka from the command line.
#!/bin/bash
export CLASSPATH=/home/username/progs/weka-3-8-2/weka.jar
java weka.Run weka.classifiers.meta.GridSearch \
-t train.arff \
-d svm.model \
-c last \
-num-slots 2 \
-sample-size 67 \