Running mattermost in docker

Ive set this up a few times and the permissions issues get me every timeFor reference this seems to be a winning recipe git clone https://github.com/mattermost/mattermost-docker/ cd mattermost-docker Edit the docker-compose.yml and change the UID and the GID to your current running user IMPORTANT! docker-compose build to build the new image mkdir -pv ./volumes/app/mattermost/{data,logs,config,plugins,client-plugins} You […]

Read More »

FreeOTP backup notes

Enabling Developer Options & USB Debugging The following steps will require you to connect your mobile phone to a computer in order to send commands, and you’ll need to perform a few tasks before we can continue. First, enable the developer options on your mobile phone: Launch the Settings app on your phone Locate the […]

Read More »

tcpdump on each interface individually

Original article here: https://serverfault.com/questions/224698/how-to-display-interface-in-tcpdump-output-flow #!/bin/bash#===================================================================================## FILE: dump.sh# USAGE: dump.sh [-i interface] [tcpdump-parameters]# DESCRIPTION: tcpdump on any interface and add the prefix [Interace:xy] in front of the dump data.# OPTIONS: same as tcpdump# REQUIREMENTS: tcpdump, sed, ifconfig, kill, awk, grep, posix regex matching# BUGS: —# FIXED: – In 1.0 The parameter -w would not work without […]

Read More »

Converting a Generation 2 HyperV VM to boot in KVM\Openstack

Brining a HyperV Gen2 VM into Openstack Convert the vhdx to raw and into ceph qemu-img convert -f vpc -O raw AC-TS01-C.VHD rbd:volumes/AC-TS01.raw Attach the old(Existing) disk and the new blank disk to a linux box Install clonezilla from apt On the new disk create a new partition(This will be an MBR partition not a […]

Read More »

Running CollectD as a container

Dockerfile FROM ubuntu:18.04RUN apt updateRUN apt-get –no-install-recommends install collectd -yRUN apt install -y python-pipRUN pip install collectd-gnocchi Running the container docker run -it –net=host –privileged -v:collectd.conf: /etc/collectd/collectd.conf collectDContainerImage collectd -C /etc/collectd/collectd.conf -f

Read More »

Run cryptominer while the screen is locked

dbus-monitor –session “type=signal,interface=org.gnome.ScreenSaver” | while read MSG; do LOCK_STAT=`echo $MSG | grep boolean | awk ‘{print $2}’` if [[ “$LOCK_STAT” == “true” ]]; then echo “was locked” killall ethdcrminer64 screen -d -m /home/user/Downloads/Claymore/ethdcrminer64 -epool exp-us.dwarfpool.com:8018 -ewal 0xaddresshere/m3 -epsw x -allpools 1 -gser 2 -allcoins exp else echo “was un-locked” killall ethdcrminer64 fi done

Read More »

Swap space notes

Whats using swap space for file in /proc/*/status ; do awk ‘/VmSwap|Name/{printf $2 ” ” $3}END{ print “”}’ $file; done | sort -k 2 -n -r | less Who is eating all of my RAM? ps aux –sort=-%mem | head Where are my swap files cat /proc/swaps How to add more swap space 1. Create […]

Read More »

Putty SSH settings to stop garbled output

Using ubuntu 18 and tools like glances and iftop would often mangle the output Changing the default Puttty settings ‘Connection > Data > ‘Terminal-type string’ to ‘putty’ instead of ‘xterm’ and setting your PuTTY settings under Translation and ensure that you have UTF-8 set as the character set then save this as the default profile […]

Read More »