hmage.net

Hello and welcome to my (pretty much empty) site!

My name's Eugene Bujak, but many call me HMage online.

I make music, I DJ, I code, I eat tea.

Music

You can listen to my music on Youtube, Spotify and Apple Music.

If for some crazy reason you want to pay for music and support me financially, you can do this on iTunes, Google Play, Amazon or Bandcamp.

I also have Twitter where I spam random nonsensical stuff — feel free to chat up with me there, I don't bite.

Projects

I also have some projects in various stages of completeness:

Random notes

This site is mainly used as my personal notepad for random scribbles – things and links that I want to keep preserved without re-hunting for them in the internet:

coding

Snippets:

  • C89 standard section 3.5.7 – omitted entries in the initalizer list are defaulted to being assigned 0. This is valid C89:
  • main() {
        int array[100] = {104, 5}; /* initializes rest to 0 */
        struct blah {int a; int b; char c; void* d;} blah = {10}; /* initializes rest to 0 */
        return 0;
    }
  • Show which options -march=native will enable:
    gcc -march=native -Q --help=target
  • Show GCC's built-in preprocessor defines:
    gcc -dM -E - < /dev/null | sort

security

unix

Snippets:

  • List installed dpkg packages sorted by size (in kilobytes):
    dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n
  • Prevent an OSX partition from automounting in /etc/fstab:
    UUID=FAB060E9-79F7-33FF-BE85-E1D3ABD3EDEA  none     hfs    rw,noauto
  • Tar into archive sorted by extension:
    find directory -not -type d | rev | sort | rev | tar cv -T - | xz > directory.tar.xz
  • Tame APT from getting translations and keep it from installing unwanted packages:
    echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/zz-local-tame
  • Prevent NTP server from panicking inside suspended VM's:
    tinker panic 0
  • Remove duplicate lines without sorting:
    awk '!x[$0]++'
  • Avoid creating temporary files to feed as filename:
    diff -u <(sort /etc/passwd) <(shuf /etc/passwd | sort)
  • Dump backtraces for all processes in pidlist:
    for i in $pidlist; do gdb -batch -n -ex 'thread apply all bt' -p "$i"; done

Video

Browser-based benchmarks

Other

You can donate by using this button: