Below you will find pages that utilize the taxonomy term “Uncategorised”
November 9, 2023
Trouble setting up wireguard-ui in docker
[ Edit: fixed by adding UID, GID, and PEER env vars to the wireguard service: https://github.com/ngoduykhanh/wireguard-ui/issues/473#issuecomment-1793604986 ]
Following a guide to set-up wireguard and wireguard-ui: https://linuxiac.com/how-to-set-up-wireguard-vpn-with-docker/
Server created on DigitalOcean with IPv4 and IPv6 addresses by default.
Configured iptables as per the set-up guide (server also runs another docker based service that opens ports 80, 433, and 9993):
sysops@master-control:~/wireguard$ sudo iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy DROP) target prot opt source destination DOCKER-USER all -- anywhere anywhere DOCKER-ISOLATION-STAGE-1 all -- anywhere anywhere ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED DOCKER all -- anywhere anywhere ACCEPT all -- anywhere anywhere ACCEPT all -- anywhere anywhere ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED DOCKER all -- anywhere anywhere ACCEPT all -- anywhere anywhere ACCEPT all -- anywhere anywhere ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED DOCKER all -- anywhere anywhere ACCEPT all -- anywhere anywhere ACCEPT all -- anywhere anywhere ACCEPT all -- anywhere anywhere Chain OUTPUT (policy ACCEPT) target prot opt source destination Chain DOCKER (3 references) target prot opt source destination ACCEPT udp -- anywhere 172.
read more
February 3, 2023
Use Canon EOS 90D as a webcam for Google Meet / Skype / Zoom / etc on Linux Ubuntu 22.04 with nVidia hardware acceleration
Quick and dirty post that pulls together a couple of sources. I might improve the post at some point. I might not…
Initial set-up:
Source https://www.youtube.com/watch?v=TsuY4o2zLVQ
Additional code to specify which video device to create.
sudo apt update && sudo apt install gphoto2 v4l2loopback-utils ffmpeg echo 'dslr-webcam' | sudo tee -a /etc/modules echo <<EOT | sudo tee -a /etc/modprobe.d/dslr-webcam.conf alias dslr-webcam v4l2loopback options v4l2loopback exclusive_caps=1 max_buffers=2 video_nr=69 EOT Hardware acceleration set-up:
read more
October 15, 2021
New hardware, who dis?
New laptop provided by work. Time to install everything that makes me productive as a PHP developer.
Using Kubuntu 21.10 as my base OS.
General utilities:
sudo apt install \ openssh-server \ net-tools \ htop \ curl \ whois \ ack \ mysql-client \ httpie \ php-cli \ freerdp2-x11 \ meld \ kcachegrind \ vokoscreen-ng \ autokey-qt \ parlatype \ thunderbird-locale-en-gb \ libreoffice-calc \ libreoffice-writer \ libreoffice-draw \ cherrytree Snaps:
read more
October 6, 2021
old and busted: mysqldump, new hotness: mydumper
I’m late to the mydumper party - https://github.com/maxbube/mydumper
Multi-threaded, lightning quick, exports to files per table structure and data.
In the Ubuntu world (and likely Debian too) it’s available as a precompiled package: sudo apt update && sudo apt install mydumper
Backup everything in a database:
mydumper \ --triggers \ --routines \ --events \ --database name_of_source_database It’ll create a date stamped directory with two files for each table. One for the schema, the other with the data.
read more
April 23, 2021
How to call a static method in PHP when you have the class name in a variable
Wrap the variable (that holds the class name) in brackets:
<?php class A { public static function foo($arg) { return 'Argument was "' . $arg . '"' . PHP_EOL; } } $result = A::foo('triggered via named class'); echo $result; $className = A::class; $result = ($className)::foo('trigged via variable'); echo $result; The output of the above code:
$ php a.php Argument was "triggered via named class" Argument was "trigged via variable"
read more
December 18, 2020
I got locked out of a google compute instance due to ssh packets being dropped
Silly thing to happen really.
Some system on the instance detected too many connections in a short amount of time - likely due to some automated tasks driven by ansible.
That resulted in iptables dropping all connections to port 22 🙁
Thankfully, with google compute, one can access the serial console via the web UI.
Unfortunately, all of my users have no passwords - this is to ensure that ssh logins are via keypairs only.
read more
December 4, 2019
KDE Plasma likes, dislikes, and would be nice to haves
With each new release of Ubuntu, I’ve stuck with the default desktop environment. These have worked well for me over the years, but thought I should see what else there is.
The only way for me to do it justice is to run KDE Plasma as my only desktop environment for a minimum of 2 weeks. So both my work station and my personal laptop are use KDE Plasma installed alongside Gnome 3 Shell on Ubuntu 19.
read more
March 29, 2019
Embiggen .desktop loaded applications on Ubuntu
I keep forgetting the steps required for this, so thought I should write them up in one easy to remember blog post for myself.
My desktop set-up consists of 2 x 1080 and 1 x 4k display. Making sure that applications are readable is a bit of a farce.
But as long as I ensure that certain applications only ever appear on the correct monitor, means that I can alter the launcher to set the correct DPI scaling.
read more
June 4, 2018
Most amusing spam received to date
Good morning…
Do not consider on my English, I am from Iran.I installed the virus on your system.After that I pilfered all confidential info from your OS. Furthermore I received some more compromising evidence.The most interesting evidence which I thieftend- its a record with your self-abusing.I adjusted malicious software on a porn web site and after you installed it. As soon as you picked the video and pressed play, my software immediately set up on your OS.
read more
August 16, 2017
Upgrading Jenkins war file the quick and dirty way
jenkins-update.sh:
#!/bin/bash set -e if [ $# -eq 0 ]; then echo "New Jenkins version number missing" exit 1 fi VERSION=${1} set -x cd /usr/share/jenkins/ wget http://updates.jenkins-ci.org/download/war/${VERSION}/jenkins.war -O jenkins.war-${VERSION} rm jenkins.war && ln -s jenkins.war-${VERSION} jenkins.war service jenkins restart The above bash script will download a given version of the jenkins.war file and symlink it into place before restarting the jenkins service.
Assumptions made:
The jenkins.war file is installed to /usr/share/jenkins The server is using upstart for running services User input is sane - there is no validation or sanitisation Comments Matthew Morton says: 27th October 2017 at 10:24 pm
read more