Skip to content

Instantly share code, notes, and snippets.

View christofluethi's full-sized avatar

Christof Lüthi christofluethi

View GitHub Profile
@christofluethi
christofluethi / wildfly-jms-queue.txt
Created November 23, 2017 11:08
List and remove messages in WildFly JMS Queue
# Run JBoss CLI-Client
$ java -jar wildfly/bin/client/jboss-cli-client.jar
You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.
# Connect to WildFly Server
[disconnected /] connect localhost:9990
Warning! The CLI is running in a non-modular environment and cannot load commands from management extensions.
# Switch to JMS Dead-Letter-Queue (DLQ)
[standalone@localhost:9990 /] cd subsystem=messaging-activemq/server=default/jms-queue=DLQ
@christofluethi
christofluethi / docker-swarm-setup-centos.md
Created December 4, 2018 20:43
Simple docker swarm setup on Centos 7

Install Docker Swarm on Centos 7

Basic Installation

Install required packages

yum install yum-utils lvm2 device-mapper-persistent-data

Add Docker-Repository

yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
@christofluethi
christofluethi / worktime-calculator.sh
Last active January 4, 2024 13:27
Work time calculator
#!/bin/zsh
if [ "$1" = "--help" -o "$1" = "-h" -o $# -gt 4 ]; then
echo "Simple calculator for same-day office hour calculation\n"
echo "Usage: $0 [-h] [start] [end] [break] [output]\n"
echo " start: Start of working or '0' to use the system boot time. Format hh:mm"
echo " end: End of working or '0' to use the current time. Format hh:mm"
echo " break: Minutes to be subtracted from work time. AKA lunch break, etc."
echo " output: Use 'short' for a one-line output.\n\n"
@christofluethi
christofluethi / gist:646ae60d797a46a706a5
Last active April 1, 2024 22:10
Convert m4a to mp3 on OS X command line using ffmpeg
brew update
brew link yasm
brew link x264
brew link lame
brew link xvid
brew install ffmpeg
ffmpeg wiki:
https://trac.ffmpeg.org/wiki/Encode/MP3