front | idx | new | login |

Chrome https localhost

In case your localhost certificate isn't valid but you want Chrome to accept it anyway, enable this flag and restart Chrome.


#public #note


regaining sudo

"Username is not in the sudoers file. This incident will be reported."

In case this happens, you may have removed yourself from the corresponding group, or the some of the configuration files are otherwise broken.

You can regain root access at least as follows:

  • boot the machine
  • press e in grub boot menu
  • add init=/bin/sh to linux boot parameters (the line starting linux )
  • press Ctrl-x to boot
  • get root prompt
Then you can add yourself back to the group or otherwise fix the files.

#public #note


Debian alternatives

Commands in Debian, that is.

Example: add /usr/bin/led as an alternative to vi.

$ sudo update-alternatives --install /usr/bin/vi vi /usr/bin/led 1
$ sudo update-alternatives --set vi /usr/bin/led
$ vi --help | head -n 1
Usage: led [flags] [file] ...

#public #note


qemu with serial output

Problem: You want to run a virtual machine in a terminal, tmux or screen.


  • Disable graphics
  • Have a serial console in virtual machine
  • Use the serial console from host terminal

Enabling serial console in Debian

  • vm$ vi /etc/default/grub
  • add console=ttyS0 to GRUB_CMDLINE_LINUX_DEFAULT
  • vm$ sudo update-grub

Starting qemu/kvm with serial console

  • $ kvm -nographic -serial mon:stdio -hda yourimage.img -smp 2 -m 1G
  • kernel messages and login appear to terminal after a few seconds
#public #note

arduino device setup

stty -F /dev/ttyACM0 9600 raw -clocal -echo -icrnl

#arduino #note #public


arduino sensor battery stats

no advanced sleep, led blinks, sensor report every 3s, bme280 sensor @ I2C, binary protocol over 433MHz, 1200mAh 3.7V lipo, transmit 5, measure all 3


  • 13:00 started, sensor reports 4.20V
  • 18:10 4.12V
  • 08:30 4.00V
sleepdog sleep, radio sleep, no led, sensor report every 10s, same sensor & proto, transmit 5
  • 4.7.2017: 09:30 4.20V
  • 5.7.2017: 11:00 4.18V
  • 6.7.2017: 21:30 4.14V
  • 8.7.2017: 19:30 4.11V
  • 11.7.2017: 07:00 4.07V
  • 14.7.2017: 14:30 4.02V
  • 15.7.2017: 20:30 4.00V
  • 25.7.2017: 9:30 3.91V

dstat machine state

dstat -tcdnsm --socket --nocolor --noupdate 10 | tee dstat.log

#note #public


kal todo

  • every day [on week N]
#public #todo #kal

bash job control notes

make jobs control silent (no exit messages printed to parent)

  • set +m
#note #public

radamsa todo

adaptive generational uniqueness filter

#todo #public #radamsa

@aohelin | aoh@github