Posts

Showing posts from 2013

Opening email links in gmail on Mac OSX

Image
Just set the default email reader on OSX Mail to the Chrome browser.

Open Source Software is more secure

Image
It's amusing how even "Architects" in MS Product Companies think Open Source Software is less secure. That's like saying a bank is safer if it's in a remote location. Or locks from unknown companies are safer than locks from known ones. Proprietary Software relies on loopholes not being found. Open Source Software relies on not having loopholes. 2022 Update Given below is a slightly better explanation of this Security Through Obscurity (STO) fallacy, by the LockPickingLawyer . There may be a market for locks with completely transparent cases, i.e., the open source software model. Limit obvious loopholes and demonstrate acceptable levels of security, by eliminating obscurity. But isn't anonymity another form of Security Through Obscurity ? "I don't think my name adds or subtracts from my message. I have no desire to be famous or well-known... I had a lot of big well-known companies as clients, and i didn't want my online presenc...

Adding PECL Uploadprogress to 1and1 shared hosting for Drupal

Drupal status page message: "Upload progress Not enabled  Your server is capable of displaying file upload progress, but does not have the required libraries. It is recommended to install the PECL uploadprogress library (prefered) or to install APC." Solution From http://jheslop.com/2009/05/27/adding-pecl-uploadprogress-to-11-shared-hosting-for-drupal-filefield/ Download  PECL uploadaccess  to your 1&1 account Extract the package tar xvzf uploadprogress-1.0.0.tgz Go into the directory cd uploadprogress-1.0.0 Run phpize5 phpize5 Change php-config to php-config5 in configure script sed -i 's/=php-config/=php-config5/g' configure Run Configure ./configure Change include directives in Makefile sed -i 's#-I/usr/local/include/php#-I/usr/include/php5#g' Makefile Run make and make test make make test Make new extensions folder for new extension to go in mkdir ~/extensions Copy uploadprogress extension to new folder cp .libs/uploadprogress.so ~/ex...

MySql Drop All Tables

One line command: mysqldump -u[user] -p[ssht...] --add-drop-table --no-data [DATABASE] | grep ^DROP | mysql -u[user] -p[sshht...] [DATABASE] Can also be used with the -h option in both places. If you use the empty -p options, you'll have to enter the password twice after running the command. The 2nd time, the password will show in clear text while typing.

Fixing an MBP OSX Superdrive that's rejecting DVDs

A lot of discussions online give this solution for fixing an MBP Superdrive that's acting out or rejecting DVDs. 1. Switch off Mac 2. Wrap the thin screen wiping cloth around a thin visiting card 3. Insert gently in Superdrive for about 2cm and clean side-to-side (the lens is supposedly a little to the left). Unbelievable as it sounds, it worked for me too! Try it at your own risk, of course.

Find the biggest MySql tables

SELECT CONCAT(table_schema, '.', table_name),        CONCAT(ROUND(table_rows / 1000000, 2), 'M')                                    rows,        CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G')                    DATA,        CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G')                   idx,        CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size,        ROUND(index_length / data_length, 2)                                           idxfrac FROM   information_schema.TABLES ORDER  BY data_length + index_length DESC LIMI...