Skip to content

Instantly share code, notes, and snippets.

View Wytamma's full-sized avatar

Wytamma Wirth Wytamma

View GitHub Profile
#! /usr/bin/env sh
# Exit in case of error
set -e
while getopts 'hne:d:u:p:c::t::' flag; do
case "$flag" in
h)
echo "This script sets a Traefik Proxy with HTTPS."
echo "Run this script on the main node after initialising the swarm"
#! /usr/bin/env sh
# Exit in case of error
set -e
while getopts 'hn:i:' flag; do
case "$flag" in
h)
echo "This script sets up a server with dockerswarm.rocks ideas."
echo "Run this script on the main node."
@Wytamma
Wytamma / hamming barcode correction.ipynb
Last active February 24, 2020 03:25
Hamming distances used to replace erroneous barcodes in qiime2 - moving-pictures - emp single end sequences.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Wytamma
Wytamma / offlinefont.py
Last active May 28, 2018 07:19
Downloading a Google font for offline use.
# https://stackoverflow.com./questions/15930003/downloading-a-google-font-and-setting-up-an-offline-site-that-uses-it
# google font links like... http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600,300
# contains links to urls of other fonts
# this script will download all the linked fonts
# enabling offline use.
import requests
with open("example.css", "r") as f:
text = f.read()
@Wytamma
Wytamma / sortfilesintofolders.sh
Last active February 24, 2020 00:48
A script to clean up your downloads folder.
# https://unix.stackexchange.com/questions/291732/sort-files-into-folders-depending-on-filetype
#!/bin/bash
set -e
set -u
set -o pipefail
start=$SECONDS
exts=$(ls -dp *.*| grep -v / | sed 's/^.*\.//' | sort -u) # not folders
@Wytamma
Wytamma / jupyterHPC.md
Last active March 13, 2018 02:52
Jupyter notebook remote connection with port forwarding JCU HPC

Connect to the HPC with port forwarding

ssh -L 9000:localhost:9786 <your_jc_number>@zodiac.hpc.jcu.edu.au

the -L flag redirects data from the specified local port, through the secure tunnel to the specified destination host and port.

Install conda

wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh