Note: I configured this thinkfan setup for my old Thinkpad w520 on Ubuntu 17.10.
Install lm-sensors and thinkfan.
sudo apt-get install lm-sensors thinkfan
| openwrt/ |
When using the JBL Flip 3 (or JBL Flip 2 or JBL Flip 4) as a permanent speaker for music or Text-to-speach announcements, connected through the AUX input and powered consantly it still goes into an automatic standby after some time of silence and it's a major problem in this use case. Depending on how long the silence was and how loud the new input audio is, it may take between 3 to 30 seconds in my experience before it resumes playing. For lack of a better place I'm posting here the information I have on solving this.
| #!/usr/bin/env python2 | |
| # a simple script for one of my articles - https://cryptolok.blogspot.com/2017/08/practical-wifi-hosts-triangulation-with.html | |
| from math import log10 | |
| MHz=raw_input('MHz FREQUENCY (2417, 5200, ...) : ') | |
| MHz=int(MHz) | |
| dBm=raw_input('dBm TRANSMITTER POWER (23, 63, ...) : ') |
#GNU Screen Cheat Sheet
##Basics
I recently came across the need to spawn multiple threads, each of which needs to write to the same file. Since the file will experience contention from multiple resources, we need to guarantee thread-safety.
NOTE: The following examples work with Python 3.x. To execute the following programs using Python 2.7, please replace threading.get_ident() with thread.get_ident(). As a result, you would need to import thread and not threading.
# threading_lock.py
import threading| ############################################################################### | |
| # The MIT License | |
| # | |
| # Copyright 2012-2014 Jakub Jirutka <jakub@jirutka.cz>. | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is |