Skip to content

Instantly share code, notes, and snippets.

View EugenMayer's full-sized avatar
🏠
Working from home

Eugen Mayer EugenMayer

🏠
Working from home
View GitHub Profile
@karlvr
karlvr / migrate-nexus-to-github-packages.md
Last active October 23, 2024 15:03
A small bash script to migrate Maven packages from Sonatype Nexus to GitHub Packages

Migrate Maven packages from Sonatype Nexus to GitHub Packages

This gist describes the process we've used to migrate our Maven package repository from Sonatype Nexus to GitHub Packages. The same process could be used for migrating any Maven package repo that is in the standard layout.

We created a special repository on GitHub to hold all of our Maven packages. You might decide to migrate packages to different repositories, in which case invoke the script multiple times.

The script uses find to look for all of the folders containing poms and upload them. You specify the folder

@offlinehoster
offlinehoster / PKGBUILD
Created October 16, 2020 12:14
Working PKGBUILD for spotify on #ARCHLINUX
# Maintainer: Ashley Whetter <(firstname) @ awhetter.co.uk>
# Co-Maintainer: NicoHood <archlinux {cat} nicohood {dog} de>
# PGP ID: 97312D5EB9D7AE7D0BD4307351DAE9B7C1AE9161
# Contributor: Eothred <[email protected]>
pkgname=spotify
pkgver=1.1.42.622
epoch=1
_commit=gbd112320
_ver_x86_64=37
@EugenMayer
EugenMayer / io test
Last active September 7, 2019 05:25
io test
# we no longer use /tmp sinc it is a tmpfs / in memory
mkdir ~/tmp
cd ~/tmp
sysbench --file-fsync-freq=1 --num-threads=16 --test=fileio --file-total-size=1G --file-test-mode=rndrw --file-rw-ratio=2 cleanup > /dev/null
sysbench --file-fsync-freq=1 --num-threads=16 --test=fileio --file-total-size=1G --file-test-mode=rndrw --file-rw-ratio=2 prepare > /dev/null
sysbench --file-fsync-freq=1 --num-threads=16 --test=fileio --file-total-size=1G --file-test-mode=rndrw --file-rw-ratio=2 run
# when you are done testing
@lukasnellen
lukasnellen / 00-docker-shorewall.md
Last active September 23, 2024 04:19
setup shorewall for docker networking beyond the default bridge network, e.g., for docker-compose

Docker(-compose) with shorewall

The shorewall documentation explains in http://shorewall.org/Docker.html how to configure shorewall for use with docker. The problem with the configuration is that it only allows connections from the host to the main bridge docker0. Connections to other networks on dynamically created bridges, with names starting by default with br-, is blocked. Instead of the recommended contents of /etc/shorewall/interfaces, use wild-card interface names as follows:

#ZONE	INTERFACE	OPTIONS
#dock	docker0		bridge     # disabled default recommendation
dock 	docker0		physical=docker+,routeback=1
dock 	br		physical=br-+,routeback=1
@fbrendel
fbrendel / ethtool.txt
Created March 7, 2018 14:02
NIC settings for Proxmox host
# ethtool --show-offload eno1
Features for eno1:
rx-checksumming: on
tx-checksumming: on
tx-checksum-ipv4: on
tx-checksum-ip-generic: off [fixed]
tx-checksum-ipv6: on
tx-checksum-fcoe-crc: off [fixed]
tx-checksum-sctp: off [fixed]
scatter-gather: on
@fbrendel
fbrendel / opnconfig.txt
Created March 7, 2018 13:49
OPNsense on Proxmox
Proxmox:
balloon: 0
bootdisk: scsi0
cores: 2
cpu: host
ide2: none,media=cdrom
memory: 3072
name: elvmlx39
net0: virtio=1A:78:93:9D:DC:48,bridge=vmbr0
@OndraZizka
OndraZizka / switchHeadphones.sh
Last active May 29, 2024 13:43
Bluetooth headset - switch between quality sound + no mic (A2DP) and crappy sound and mic (HSP/HFP)
#!/bin/bash
#### Restart Bluetooth
if [ "$1" == "resetBT" ] ; then
sudo rfkill block bluetooth && sleep 0.1 && sudo rfkill unblock bluetooth;
exit;
fi;
#### Toggle listen/speak
if [ "$1" == "" -o "$1" == "toggle" ] ; then
@hopeseekr
hopeseekr / docker_dedicated_filesystem.md
Created February 3, 2018 04:01
Putting Docker on its own pseudo filesystem

Docker on BTRFS is very buggy and can result in a fully-unusable system, in that it will completely butcher the underlying BTRFS filesystem in such a way that it uses far more disk space than it needs and can get into a state where it cannot even delete any image, requiring one to take drastic actions up to and including reformatting the entire affected BTRFS root file system.

According to the official Docker documentation:

btrfs requires a dedicated block storage device such as a physical disk. This block device must be formatted for Btrfs and mounted into /var/lib/docker/.

In my experience, you will still run into issues even if you use a dedicated partition. No, it seems it requires a standalone

@Luzifer
Luzifer / README.md
Last active August 25, 2024 10:01
Running docker-compose as a systemd service

Running docker-compose as a systemd service

Files

File Purpose
/etc/compose/docker-compose.yml Compose file describing what to deploy
/etc/systemd/system/docker-compose-reload.service Executing unit to trigger reload on docker-compose.service
/etc/systemd/system/docker-compose-reload.timer Timer unit to plan the reloads
/etc/systemd/system/docker-compose.service Service unit to start and manage docker compose
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active November 13, 2024 14:50
Hyperlinks in Terminal Emulators