Mulititasking and distraction hurts IQ more than pot
Posted: 12 March 2012 Filed under: productivity | Tags: multitasking, productivity Leave a comment »That’s interesting.
Dr. Glenn Wilson, a psychiatrist at King’s College London University, monitored the IQ of workers throughout the day.
He found the IQ of those who tried to juggle messages and work fell by 10 points — the equivalent to missing a whole night’s sleep and more than double the 4-point fall seen after smoking marijuana. [Dr. Wilson did not originally make the comparison to marijuana. - eds.]
“This is a very real and widespread phenomenon,” Wilson said. “We have found that this obsession with looking at messages, if unchecked, will damage a worker’s performance by reducing their mental sharpness.
“Companies should encourage a more balanced and appropriate way of working.”
Wilson said the IQ drop was even more significant in the men who took part in the tests.
Drupal Security Team response to bogus 7.12 CSRF issues
Posted: 9 March 2012 Filed under: drupal | Tags: drupal, security, web application security Leave a comment »“The Drupal Security team has concluded that this does not constitute a valid vulnerability. The attack depends on a ‘Man In the Middle’ attack or sniffing software, which is outside of Drupal and presents a much bigger problem.
The Drupal Security team provides an easy way to report issues by sending emails to security@drupal.org, and we will credit researchers with all issues they report in this manner. No formal report of this issue was filed directly with our team. We encourage all researchers to follow the practice of responsible disclosure, and report directly to our team to ensure both that we can provide public credit for authentic vulnerabilities, and keep our users as secure as possible.”
Drupal very popular for observable “dot gov” .gov sites
Posted: 9 March 2012 Filed under: Uncategorized | Tags: dot gov, drupal Leave a comment »Drupal has been steadily growing in popularity among live “dot gov” domains. According to one analysis, it powers nearly twice as many of those .gov domains as all other CMSs combined — though 93% of those run no detectable CMS. The analysis is currently being updated.
eth0 interface in VirtualBox (Backtrack 5 VM)
Posted: 5 March 2012 Filed under: system administration | Tags: debian, networking, ubuntu, virtualbox Leave a comment »After generating a new MAC address for a virtual NIC, I had two interfaces: the loopback interface (lo) and eth3. eth0 had disappeared, and eth3 wasn’t getting assigned an IP.
It turns out that udev on Debian assigns a new eth number for each new MAC address. Deleting the file /etc/udev/rules.d/70-persistent-cd.rules solved this problem.
Reading HTML e-mail with Mutt
Posted: 25 January 2012 Filed under: productivity, ubuntu | Tags: e-mail, mutt Leave a comment »Glory be! It’s pretty easy to get nicely formatted output of those sneaky HTML e-mail messages (which all the young Internet kids are sending nowadays).
In your ~/.mailcap, if you use w3m (as I do):
text/html; w3m %s -o display_link_number=1; nametemplate=%s.html
text/html; w3m -dump %s -o display_link_number=1; nametemplate=%s.html; copiousoutput
And in your ~/.muttrc:
auto_view text/html
The Debian Administration site tells you how!
ssh-copy-id behavior
Posted: 17 October 2011 Filed under: system administration | Tags: command line, ssh, ssh-copy-id Leave a comment »Keep an eye out for this one. When using ssh-copy-id to copy my public key to a remote host, I found that it had not properly appended my id to the remote ~/.ssh/authorized_keys file. It concatenated it on to the end, with no linefeed. Just be sure to check for that!
Original remote ~/.ssh/authorized_keys
ssh-dss AAA...== forest@machine
After ssh-copy-id did its work:
ssh-dss AAA...== forest@machinessh-dss AAAAB...gdA== forest@laptop
Ubuntu batch photo processing
Posted: 17 October 2011 Filed under: ubuntu | Tags: command line, photos, ubuntu Leave a comment »Way-cool batch photo processing on Ubuntu, GNU/Linux, Windows, and Mac with Phatch.
http://photobatch.wikidot.com/getting-started
Enabling Apache’s PHP execution in User Directories on Ubuntu Lucid
Posted: 6 October 2011 Filed under: ubuntu | Tags: apache, drupal, php Leave a comment »Ubuntu Lucid ships with PHP disabled for user directories. That’s a sensible security default, but it won’t allow your developers to get their work done. And if you’re working with Drupal, you’ll need all the steps listed here.
First, you’ll need to install Apache:
sudo apt-get install apache2
Then the compiled PHP binary (or “shared object” in Apache lingo):
sudo apt-get install php5
You may need to do sudo /etc/init.d/apache2 restart or sudo service apache2 restart to have it pick up the updated configuration file that loads the PHP5 module. Try visiting your own box at “localhost” to see if you get a nice “welcome” page. You can put an “info.php” file in /var/www to test if PHP is working (the contents of your info.php file are simply <?php phpinfo(); ?>), and visit that in your browser.
Once you’ve gotten PHP running under Apache, edit /etc/apache2/mods-available/php5.conf and comment out the lines as instructed:
<IfModule mod_php5.c>
<FilesMatch "\.ph(p3?|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
# To re-enable php in user directories comment the following lines
# (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
# prevents .htaccess files from disabling it.
# <IfModule mod_userdir.c>
# <Directory /home/*/public_html>
# php_admin_value engine Off
# </Directory>
# </IfModule>
</IfModule>
If you’re developing with Drupal, the following step may also be necessary: In /etc/apache2/mods-available/userdir.conf, you should allow Drupal’s local .htaccess file to override the Apache-wide configuration file, with:
(...)
<Directory /home/*/public_html>
AllowOverride All
#AllowOverride FileInfo AuthConfig Limit Indexes
#Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
(...)
Restart Apache with sudo /etc/init.d/apache2 restart and you might be done!
SSH public RSA key errors
Posted: 5 October 2011 Filed under: system administration | Tags: command line, pki, ssh, system administration Leave a comment »Seen these before when trying to login via SSH with your new RSA public key?
Nov 2 12:09:17 hostname sshd[12712]: error: buffer_get_ret: trying to get more bytes 257 than in buffer 73
Nov 2 12:09:17 hostname sshd[12712]: error: buffer_get_string_ret: buffer_get failed
Nov 2 12:09:17 hostname sshd[12712]: error: buffer_get_bignum2_ret: invalid bignum
Nov 2 12:09:17 hostname sshd[12712]: error: key_from_blob: can't read rsa key
Nov 2 12:09:17 hostname sshd[12712]: error: key_read: key_from_blob AAAAB3N[...] failed
In my case these were the result of copying a public key from e-mail, which tends to mangle long text lines. I usually don’t have this problem because I use the ssh-copy-id script to copy my keys to a remote host before attempting to log in.
mysqldump: dump rows matching certain criteria, or limit number of dumped rows
Posted: 23 September 2011 Filed under: development | Tags: command line, mysql, mysqldump, web development Leave a comment »To limit the number of rows dumped by mysqldump, you can do:
mysqldump -u [user] -p[password] --where="true LIMIT 5" [database] [tablename] > outputfilename.sql
You could select other criteria as well:
mysqldump -u [user] -p[password] --where="userid > 24" [database] [tablename] > outputfilename.sql
