front | idx | new | login |
 

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

3.7.2017

  • 13:00 started, sensor reports 4.20V
  • 18:10 4.12V
4.7.2017
  • 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
#public
 

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

 

pip notes

Find available package versions:

  • pip install foobar==
Install a specific version
  • pip install foobar==1.2.3
#public #note
 

ssh screenshot

ssh [-p port] you@server.tla "DISPLAY=:0 xwd -root | gzip" | gzip -d | xwud

#public #note

 

qemu port redirection

The redir flag has been deprecated. Syntax for e.g. ssh redirection is now -netdev user,id=ether0,hostfwd=tcp:127.0.0.1:2222-:22 -device rtl8139,netdev=ether0

Notice that

  • the syntax has changed (- in redirection)
  • you need to give an id
  • you need to define the virtual device and use the id
(you'll probably also want -usbdevice tablet to avoid mouse grab issues now)

#note #public

 

Google SMTP

Problem: You need to send email easily from command line on some server without configuration hassle.

Simple solution: Install Heirloom mailx and use Google SMTP server for outgoing mail.

Using Google SMTP server for outgoing mail with mailx.

  • sudo apt-get install heirloom-mailx
  • Create an app-specific password -> YOURAPPKEY
  • echo hello there | mailx -v -S smtp=smtp.gmail.com -S from="you@server.org" -S smtp-use-starttls -S smtp-auth=login -S smtp-auth-user="youraccount@gmail.com" -S smtp-auth-password="YOURAPPKEY" -s "such subject" recipient@server.org
  • Receive email
#public #note
@aohelin | aoh@github