Doing my work from home via Jitsi (Jabra headset) and Listening to music on my speakers. Sometimes i want to switch output. For example spotify on my headset.
Using below code, i can easily switch between output sinks.
#!/bin/bash
if [ -z "$1" ]; then
echo "DEVICE"
pactl list sinks | egrep "^Sink|Description" | sed 'N;s/\n/,/' |sed -e 's/\t/ /g' | cut -f2,5- -d" "
echo "APPLICATIONS"
pactl list sink-inputs | egrep -ie "^Sink|application.name" | grep -v "\-application-name" | sed 'N;s/\n/,/' | sed -e 's/\t/ /g' | sed -e 's/ / /g' | cut -f3,6- -d" "
echo "Usage: $0 APPID DEVICEID" >&2
exit 1
fi
pactl move-sink-input $1 $2
It shows output devices, and applications which are using audio sinks. Just match them up.
Modded this one, as part of my modular amiga system where i wanted to remake every part onto 10×15 euro prints. So i could swap things out for other boards.
Memory expansion
512k .. missing in action Go a new one in … ?
Boot selector
Swaps df0 and df1 DIY version was a wirewrap ic socket with a cross switch, now i have a Gotek buffered switching module with can be actvated with a keystroke. (Gotek post)
Keyboard mod
Hidden key (in the space of the stands, which triggered a extra key stroke)
Kickstart selector
A print you can insert in the ROM socket of your amiga. Had only 1.2 and 1.3. Now there are many .. like diagnostic roms. I made a altered 1.2 version .. which was unusable .. i f*cked it up
SID mod
Added a sid parallel on the 8020 CIA chip
Gotek driver emulator
I made a arduino version to read disks. (Other post) But this is a disk image drive emulator. See Gotek post
Boot sector warn
Piezo beeper which warned me when a boot sector was being written (virus alert)
Sound filter fix
Amiga audio filter enhancer, using capacitors and resistors
A fancy keyboard….. At last a clickety keyboard. A Razer Blackwidow V3 mechanical keyboard. I’m not a gamer, but i like the clickety sounds. RGB leds are always nice to play with.
One of the nice things about razer is the Linux support!
I made a little script to make a 360 spherical panorama photo, using a remote controlled IP cam,
Looking at the API CGI, i only needed to control the movement of the camera and getting a snapshot.
Point camera down
Point camera maximal left
Take picture
Point a little to the right
Take picture, loop until max right
Point a little more up and go max left
Doing same loop as above, until pointing maximal up
Made a little animation in blender
After getting all those pictures, i only needed to stitch them using Hugin. When viewing the image with VR Glasses, i could look around my room, without image distortion, like below flattend example.
The ipcam generates a token, which you have to use in your curl commands.
GlusterFS (Gluster File System) is an open source Distributed File System that can scale out in building-block fashion to store multiple petabytes of data.
Below is a test environment which creates 5 docker instances, which represent 5 gluster servers. This was for test repairing our work gluster.
First install gluster and pull a image: docker pull gluster/gluster-centos
gethosts
for f in 1 2 3 4 5;
do
echo "$(docker exec -it gluster_${f} ip a s | grep 172 | awk '{ print $2 }' | cut -f1 -d/) gluster_${f}"
done
create_dockers
for f in 1 2 3 4 5; do
docker run --name gluster_${f} --privileged=true -d gluster/gluster-centos /usr/sbin/init
done
create_bricks
for f in 1 2 3 4 5; do
docker exec -it gluster_${f} mkdir -p /bricks/brick01
done
destroy_dockers
for f in 1 2 3 4 5; do
docker stop gluster_${f}
docker rm gluster_${f}
done
diskcreator
for f in $(seq 1 5); do
dd if=/dev/zero of=/root/disk${f} count=1 bs=100M
losetup /dev/loop${f} /root/disk${f}
docker run --name gluster_${f} --privileged=true --device=/dev/loop${f} -d gluster/gluster-centos /usr/sbin/init
done