Skip to content

Instantly share code, notes, and snippets.

View bionade24's full-sized avatar
💭
[ ***] A stop job is running for working brain cells (42min 10s / no limit)

Oskar Roesler bionade24

💭
[ ***] A stop job is running for working brain cells (42min 10s / no limit)
View GitHub Profile
#!/usr/bin/env bash
echo "List orphan dependencies: ";
for pkg in $(pacman -Qdtq); do
pacman -Qi "$pkg"
read -p "Remove pkg? (y/n) " remove
if [ $remove == "y" ]; then
sudo -E pacman -Rsc "$pkg" || sudo -E pacman -Rdd --noconfirm "$pkg";
fi
done
@bionade24
bionade24 / mkimage-arch-pacman.conf
Created March 31, 2024 20:36
Create Archlinux Docker image
#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives
#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
"LD_* scout runtime" information:
{
"can-write-uinput" : true,
"steam-installation" : {
"path" : "/home/oskar/.local/share/Steam",
"data_path" : "/home/oskar/.local/share/Steam",
"bin32_path" : "/home/oskar/.local/share/Steam/ubuntu12_32",
"steamscript_path" : "/usr/lib/steam/steam",
"steamscript_version" : "1.0.0.78",
"issues" : [
#! /usr/bin/env bash
shopt -s dotglob
TMP_PATH="/tmp/SchiffeVersenken_temp"
CALLDIR="$(pwd)"
build_project() {
javac -sourcepath "${TMP_PATH}/src/" ${TMP_PATH}/src/de/uniluebeck/itm/schiffeversenken/**/*.java -d "${TMP_PATH}/bin" || return 1
javadoc -quiet -sourcepath "${TMP_PATH}/src/" -d "${TMP_PATH}/doc" -subpackages de.uniluebeck.itm.schiffeversenken || return 1
server {
listen 80;
server_name abs-cd.example.com;
# include includes/le-webroot;
#
# location / {
# return 301 https://$server_name$request_uri;
# }
#!/usr/bin/python3
"""
Usage:
# Create train data:
python xml_to_csv.py -i [PATH_TO_IMAGES_FOLDER]/train -o [PATH_TO_ANNOTATIONS_FOLDER]/train_labels.csv
# Create test data:
python xml_to_csv.py -i [PATH_TO_IMAGES_FOLDER]/test -o [PATH_TO_ANNOTATIONS_FOLDER]/test_labels.csv
"""
@bionade24
bionade24 / unzip.sh
Last active February 4, 2024 12:08
unzip wrapper to unzip into a new dir
#!/usr/bin/env bash
#If arguments are provided or called by another script, use normal unzip behaviour
if [[ (($# > 1)) || ( (($SHLVL > 2)) && -z ${TMUX} ) || (($SHLVL > 3)) ]]; then
/usr/bin/unzip "$@";
else
NAME=$(echo "${1}" | sed s/\ /_/g | sed s/\.zip//)
mkdir $NAME
/usr/bin/unzip "${1}" -d "$NAME";
fi
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bionade24
bionade24 / tcmake.sh
Last active April 29, 2020 06:29
cmake wrapper for building in /tmp
#!/bin/zsh
PROJECT_PATH=$(pwd)
PROJECT_NAME=$(printf '%q\n' "${PWD##*/}")
if ! [ -d /tmp/tcmake/$PROJECT_NAME ]; then
echo "Creating /tmp/tcmake/$PROJECT_NAME"
mkdir -p /tmp/tcmake/$PROJECT_NAME;
fi
cd /tmp/tcmake/$PROJECT_NAME
@bionade24
bionade24 / issue.sh
Created April 28, 2020 18:06
acme.sh Auto issue configuration
#/bin/sh
DOMAIN=$1
echo $DOMAIN
if ! [ -d /etc/nginx/certs/$DOMAIN ]; then
echo "$DOMAIN folder gets created"
mkdir /etc/nginx/certs/$DOMAIN;
fi
~/.local/bin/acme.sh --force --issue -d $DOMAIN --keylength 4096 -w /var/www/letsencrypt --key-file /etc/nginx/certs/$DOMAIN/key.pem --ca-file /etc/nginx/certs/$DOMAIN/ca.pem --cert-file /etc/nginx/certs/$DOMAIN/cert.pem --fullchain-file /etc/nginx/certs/$DOMAIN/fullchain.pem --reloadcmd "sudo nginx -s reload"