Author Archive

Resources for Learning Git and GitHub

Resources for Learning Git and GitHub
http://chronicle.com/blogs/profhacker/resources-for-learning-git-and-github/48285

Audiences, Outcomes, and Determining User Needs

A List Apart: for people who make websites

via Audiences, Outcomes, and Determining User Needs.

MySQL Export to CSV File

Ever needed to export data from MySQL into a CSV file? Its actually fairly simple,

SELECT * INTO OUTFILE ‘/tmp/name.csv’
FIELDS TERMINATED BY ‘,’
OPTIONALLY ENCLOSED BY ‘”‘
ESCAPED BY ‘\\’
LINES TERMINATED BY ‘\n’
FROM [tablename]

Certainly easier then writing a quick Python/Perl/PHP script to do the job.

via MySQL Export to CSV File.

LifeHacker: Adjust Your Car Mirrors Properly To Avoid Accidents

Adjust Your Car Mirrors Properly To Avoid Accidents via LifeHacker

Many accidents could be avoided if everyone had their car side and rearview mirrors positioned correctly, eliminating blind spots and making it easier to change lanes quickly.

Are You Reading Too Much?

Productivity501 via Are You Reading Too Much?.

Reading, after a certain age, diverts the mind too much from its creative pursuits. Any man who reads too much and uses his own brain too little falls into lazy habits of thinking.

~ Albert Einstein

The theming firehose (NB for designers & front-end developers new to Drupal) | rare pattern

You theme with the mark-up you have, not the mark-up you'd like to have.

That's the essential truth that designers and front-end developers new to Drupal need to understand. You don't get to construct your pages from scratch, building out essentials, never a wasted div, never an extraneous class. No, you have to flip the entire process around. With Drupal you're getting markup shot at you from a firehose, and as a themer you need to sop it all up and make it pretty. Don't spill a drop.

via The theming firehose (NB for designers & front-end developers new to Drupal) | rare pattern.

InnoDB is red hot, MyISAM not

Planet MySQL

via InnoDB is red hot, MyISAM not.

Everyone who started using MySQL before 5.5 started off with MyIsam. It was the default storage engine and you had to go out of your way to use anything else. It was a good looking database, rugged…

MySQL Query to get Data, Index and Table Size by Storage Engines

SELECT IFNULL(B.engine,’Total’) “Storage Engine”, CONCAT(LPAD(REPLACE(FORMAT(B.DSize/POWER(1024,pw),3),’,’,”),17,’ ‘),’ ‘,SUBSTR(‘ KMGTP’,pw+1,1),’B’) “Data Size”, CONCAT(LPAD(REPLACE(FORMAT(B.ISize/POWER(1024,pw),3),’,’,”),17,’ ‘),’ ‘,SUBSTR(‘ KMGTP’,pw+1,1),’B’) “Index Size”, CONCAT(LPAD(REPLACE(FORMAT(B.TSize/POWER(1024,pw),3),’,’,”),17,’ ‘),’ ‘,SUBSTR(‘ KMGTP’,pw+1,1),’B’) “Table Size” FROM (SELECT engine,SUM(data_length) DSize,SUM(index_length) ISize,SUM(data_length+index_length) TSize FROM information_schema.tables WHERE table_schema NOT IN (‘mysql’,’information_schema’) AND engine IS NOT NULL GROUP BY engine WITH ROLLUP) B,(SELECT 3 pw) A ORDER BY TSize;

Sample Report:

MyISAM 0.031 GB 0.013 GB 0.044 GB
InnoDB 0.599 GB 0.471 GB 1.069 GB
Total 0.630 GB 0.484 GB 1.113 GB

Compile PHP Extensions on Mac Snow Leopard OS X

If you have to custom compile PHP Extensions on Mac with Snow Leopard OS X while using MAMP , you will need to execute following commands. These are necessary to compile modules with both 32bit and 64bit support.

/Applications/MAMP/bin/php5.3/bin/phpize
MACOSX_DEPLOYMENT_TARGET=10.6
CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp"
CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe"
CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe"
LDFLAGS="-arch i386 -arch x86_64 -bind_at_load"
export CFLAGS CXXFLAGS LDFLAGS CCFLAGS MACOSX_DEPLOYMENT_TARGET

Install Emacs on Ubuntu Lucid 10.04

Here is the single command to get you started with using emacs on Ubuntu. This will get you all the pretty syntax highlight for PHP, Python or even Ruby

sudo apt-get install emacs-snapshot emacs-goodies-el php-elisp ruby-elisp python-elisp