Installing Nagios
I had a heck of a time finding the config file for nagios. It's under: /etc/nagios3/conf.d/localhost_nagios2.cfgThese guides were helpful:
http://ostatic.com/blog/monitoring-web-services-with-nagios
https://library.linode.com/server-monitoring/nagios/ubuntu-12.04-precise-pangolin
MySQL Not Starting On Reboot
http://stackoverflow.com/questions/9859381/how-make-mysql-start-automatically-linux-cli-onlyI was able to to the following, based on the post above:
- sudo apt-get install sysv-rc-conf
- sudo sysv-rc-conf
- mark the 6 column for mysqld or mysql.server (6 = reboot)
Note: I tried sudo update-rc.d mysql.server defaults and it didn't work. It gave me the following error: System start/stop links for /etc/init.d/mysql.server already exist.
Fira Font
https://github.com/mozilla/FiraMozilla's new Fira font looks great. Looking forward to use it on some future projects.
MySQL IF Statement Affect On Speed
if(`table`.`start`='0000-00-00','',`table`.`start`)That's the part of my query that was increasing the execution time by 10x.
I changed it to just `table`.`start` (without the IF statement) and the query was 10x faster.
Phonegap Start (for Phonegap Build)
"A Hello World application to get started with PhoneGap Build."
Twilio PHP Library Using A Proxy
https://github.com/twilio/twilio-php/issues/144I found a spot where I can add a proxy to the twilio PHP library.
Go to TinyHttp.php and add the highlighted part (using your own URL of course):
$opts[CURLOPT_PROXY] = 'http://xxx.xxx.xxx.xxx:8080/';
try {
if ($curl = curl_init()) {
Failed to connect to socket /var/run/dbus/system_bus_socket
Error: Can't find out if NetworkManager is running: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory.The following fixed the problem:
apt-get install dbus
(if you already have dbus installed: sudo service dbus start)
/etc/init.d/network-manager start
What caused the error?:
/etc/init.d/network restart
Could not initialize NMClient
** (process:17986): WARNING **: error: could not connect to NetworkManagerFix: Try running with sudo.
For example: sudo nm-tool | grep DNS
Check If Script Is already Running - Python
http://pythonhosted.org/tendo/import tendo
# If is there another instance already running:
# display the message “Another instance is already running, quitting.”, and return -1 error code.
me = SingleInstance()