lundi 4 juillet 2016

Dimming screen / "night mode" for android or mac

Applications I used to dim my screen, reduce the amount of "blue color" that is supposed to make you awake :



mardi 14 juin 2016

MySQL to CSV file



SELECT order_id,product_name,qty
FROM orders
WHERE foo = 'bar'
INTO OUTFILE '/tmp/orders.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n';


TODO : There is still to find how to print the column titles along with the result...




lundi 29 février 2016

VirtualBox install / config de base

 * Config Clavier Mac sous Debian :
https://lokan.fr/2013/12/11/configurer-correctement-son-clavier-mac-sous-debian/
XKBMODEL="pc105"
XKBLAYOUT="fr"
XKBVARIANT="mac"
XKBOPTIONS="lv3:switch,compose:lwin”
* Config redimensionner fenêtre VirtualBox
(non testé ) : https://forums.virtualbox.org/viewtopic.php?f=2&t=68966
* http://download.virtualbox.org/virtualbox/5.0.14/
* http://download.virtualbox.org/virtualbox/5.0.14/UserManual.pdf
* Be sure to have the kernel headers, gcc and other basic build-tools installed
apt-cache search/apt-get install build-essential linux-headers-$(uname -r) dkms

* If present, it should be in /media/cdrom (or /media/cdrom0)
cd /media/cdrom0
sh VBoxLinuxAdditions.run

* NB : you might need to reboot the host.
* You can now add some shared folders (for example). They will be owned by root with drwxrwx--- root vboxsf (group)
* Add user in group vboxsf :
sudo usermod cm -a -G vboxsf


mardi 26 janvier 2016

Monitoring : POC around Monit + M/Monit





Monit + M/Monit
OpenSouce, on bitbucket. https://bitbucket.org/tildeslash/monit/



Monit : "Agent" or "Slave", running on each server where monit his used.
https://mmonit.com/monit/

M/Monit : "Master" allowing to connect, get and coordinate events and actions to&from all monit agents connected.
https://www.mmonit.com/



mmonit manual :
https://mmonit.com/documentation/mmonit_manual.pdf
https://mmonit.com/wiki/Monit/ConfigurationExamples



idea 1 : how to enhance this project : contribute a "log snippet" =
along side with the "start/stop program" in the config file, add a "logfile path" configuration setup that would watch this file(s) and make it available to the agent, and then to the master.

idea 2 : interface monit & elasticsearch (or implement monit within elasticsearch ?)





-----
Other monitoring tools :

* Prometheus "
An open-source service monitoring system and time series database."
http://prometheus.io/docs/introduction/getting_started/
 https://github.com/prometheus/prometheus


 * Sensu : A monitoring framework that aims to be simple, malleable, and scalable
https://sensuapp.org/
https://github.com/sensu/sensu

 * Ganglia
 http://ganglia.info/