It’s really easy to keep an eye on the importing progress, as easy as:
pv database_backup.sql | mysql -u user -p
What really pv does? It monitors the progress of data through a pipe.
So the progress bar and ETA will not be accurate, because the speed of the import will depend on other factors too, but it’s a great indicator.
Count files in the actual folder and his subdirectories.
find . -type f | wc -l
via Counting All Files in a Linux Directory.
- Generate the SQL from the ORM’s “native” query format
- Do a network round-trip to the database server
- Parse the SQL
- Fetch the data from the cache
- Serialise the data to the database’s over-the-wire format
- Deserialize the data into the database client library’s format
- Convert the database client librarie’s format into language-level objects (i.e. a collection of whatevers)
- An application caches just what it needs so you should get a better cache hit ratio
- Accessing a local cache will probably be a couple of orders of magnitude faster than accessing the database due to network latency – even with a fast network
java – Why use your application-level cache if database already provides caching? – Stack Overflow.
MySQL installed with the official .pkg installer
/usr/local/mysql/data/HOSTNAME.err (insert your hostname)
/usr/local/mysql/ (this is a symbolic link)
MySQL pre-installed on Mac OS X Server
MySQL 5 installed with MacPorts
/opt/local/var/db/mysql5/HOSTNAME.err (insert your hostname)
MySQL installed with MAMP
MySQL installed with MAMP PRO
MAMP PRO shares many paths with MAMP, with the following difference:
/Library/Application Support/appsolute/MAMP PRO/db/mysql
MySQL installed with XAMPP
MySQL installed with Zend Server CE
via Sequel Pro
Besides syntactical validation of email addresses, sometimes could be really useful to check if a given email address actually exists. For example when you know that you’ll have to send very important communications to your user (tickets, bills? non just newsletters).
Here is how to use the SMTP protocol to do this without actually sending an email. Basically you can initiate a standard communication with the recipients SMTP server, set the recipients’ email address and read the server response, which will be an error if the address is wrong. Then simply quit the communication without sending any email. Simple!
Here is the complete article: http://www.webdigi.co.uk/blog/2009/how-to-check-if-an-email-address-exists-without-sending-an-email/
Library to better manage JSONP requests, and to handle errors.
, same origin policy
Install with MacPorts
sudo macports php5-mcrypt
Then do not forget to edit the php.ini and add the entire extension path!
via osx – Installing Mcrypt extension for PHP on Mac OS X 10.5.8 – Stack Overflow.
Quite slow but it works
sudo port sync
sudo port selfupdate
sudo port install php5-openssl
via Can’t run Composer on my Mac Mountain Lion – openssl extensionpen.
curl -s http://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer.phar
And if youre even more lazy, like me, you can create an alias:
This way you can invoke composer with just composer
Update: Composer now offers another method as well on the website:
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
via php – Global Installation of Composer manual – Ask Ubuntu.