Reload Enviromental Variables Without Logging Out - Ubuntu
This doesn't actually work: "source /etc/environment"This did the trick though:
for line in $( cat /etc/environment ) ; do export $line ; donehttp://superuser.com/questions/339617/how-to-reload-etc-environment-without-rebooting#comment371112_339617Open Source Charting Library With Vertical Markers/Annotations
Saw this charting library from the Mozilla Metrics Team on hacker news recently: http://metricsgraphicsjs.org/interactive-demo.htmTheir interactive example is here: http://metricsgraphicsjs.org/interactive-demo.htm
I'm not aware of any other charting libraries besides highcharts that do vertical marker lines this easily.
Python datetime.strftime Cheat Sheet
http://strftime.org/Using Bootstrap-DateRangePicker As A Timepicker
Here's the jsfiddle: http://jsfiddle.net/d8uomdjv/It seems like the author is opposed to adding this sort of functionality: https://github.com/dangrossman/bootstrap-daterangepicker/issues/295
re.match vs re.search - Python
http://stackoverflow.com/a/180993/1364191- re.match - If zero or more characters at the beginning of string match the regular expression pattern.
- re.search - Scan through string looking for a location where the regular expression pattern produces a match
New Machine Setup For Flask Development On Ubuntu
Here are the commands I use when I bring up a new Ubuntu server for flask development:
MySQL Performance LXC Container vs Host
I have a linux virtual container (LXC) and the server hosting the container running the same version of MySQL with the same database.I tried running some select queries on both of the both the virtual container and host for benchmark purposes. My conclusion? MySQL read performance inside and outside the LXC container is the exactly the same.
WHMCS Cronjob Error
If you get the following error while you try to run the WHMCS cronjob from the command line:Site error: the file <b>/var/www/accounts/admin/cron.php</b> requires the ionCube PHP Loader ioncube_loader_lin_5.3.so to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.
You need to add your the ioncube zend extension to the CLI php.ini too: /etc/php5/cli/php.ini
Sendmail/STARTTLS verify=FAIL
Oct 19 14:04:34 Billing sm-mta[17583]: STARTTLS=client, relay=aspmx.l.google.com., version=TLSv1/SSLv3, verify=FAIL, cipher=ECDHE-RSA-RC4-SHA, bits=128/128
If you see those errors in your mail.log and your emails are failing to send, you need to add your ssl cert from apache to the sendmail config in /etc/mail/sendmail.cf:
# CA directory
O CACertPath=/etc/apache2/ssl
# CA file
O CACertFile=/etc/apache2/ssl/example.ca-bundle
# Server Cert
O ServerCertFile=/etc/apache2/ssl/example.cert
# Server private key
O ServerKeyFile=/etc/apache2/ssl/example.key