Posts in 2019

  • Sqlite pretty print

    Wednesday, June 19, 2019 in Miscellaneous

    In ~/.sqliterc : .mode column .headers on .separator ROW "\n" .nullvalue NULL

    Read more

  • Qemu

    Monday, June 10, 2019 in Commands

    Quickly launch a qemu vm with local qcow as hard drive In this example I am using the docker0 bridge because I do not want to have to modify my shorewall config, but any proper bridge would do : ip tuntap add tap0 mode tap brctl addif docker0 tap0 …

    Read more

  • Busybox web server

    Tuesday, April 16, 2019 in Commands

    If you have been using things like python -m SimpleHTTPServer, here is something even more simple and lightweight to use : busybox httpd -vfp 80

    Read more

  • etc-update script for alpine linux

    Tuesday, April 02, 2019 in Miscellaneous

    Alpine linux doesn’t seem to have a tool to merge pending configuration changes, so I wrote one : #!/bin/sh set -eu for new_file in $(find /etc -iname '*.apk-new'); do current_file=${new_file%.apk-new} echo "===== New config file …

    Read more

  • Steam

    Saturday, February 16, 2019 in Gentoo

    I am not using a multilib profile on gentoo (I use amd64 only everywhere), so when the time came to install steam I had to get a little creative. Overall I believe this is the perfect way to install and use steam as it self contains it cleanly while …

    Read more

  • Shell usage in dockerfile

    Monday, February 04, 2019 in Docker

    The default shell is [“/bin/sh”, “-c”], which doesn’t handle pipe fails when chaining commands. To process errors when using pipes use this : SHELL ["/bin/bash", "-eux", "-o", "pipefail", "-c"] References …

    Read more

Posts in 2018

  • Pleroma installation notes

    Friday, November 16, 2018 in Miscellaneous

    This article is about my installation of pleroma in a standard alpine linux lxd container. Installation notes apk add elixir nginx postgresql postgresql-contrib git sudo erlang-ssl erlang-xmerl erlang-parsetools erlang-runtime-tools make gcc …

    Read more

  • rrdtool

    Tuesday, September 25, 2018 in Commands

    Graph manually for i in `ls`; do rrdtool graph $i.png -w 1024 -h 768 -a PNG --slope-mode --font DEFAULT:7: \ --start -3days --end now DEF:in=$i:netin:MAX DEF:out=$i:netout:MAX \ LINE1:in#0000FF:"in" LINE1:out#00FF00:"out" done …

    Read more

  • Pulseaudio

    Tuesday, September 25, 2018 in Miscellaneous

    List outputs : pacmd list-sinks | grep -e 'name:' -e 'index' Select a new one : pacmd set-default-sink alsa_output.usb-C-Media_Electronics_Inc._USB_PnP_Sound_Device-00.analog-stereo

    Read more

  • List active calls on asterisk

    Tuesday, September 25, 2018 in Commands

    watch-d-n1'asterisk -rx “core show channels”'

    Read more