I recently installed the memcached daemon on my MacBook Pro, incuding the necessary PHP client for development purposes. I just prefer to work locally instead of using a VM running Linux. And the process is actually quite simple and straight forward. Please note, I have included both clients, the old standard one and the newer PECL extension, because I deal with different applications and also lots of people seems to get confused when they install one version and their memcache classes cannot get instantiated and throw errors. So, if in doubt, just install both.
These are the five (four if you know which extension you want) components needed:
- libevent (requred library for memcached)
- memcached daemon
- libmemcached (required library for the php client)
- php extension (standard)
- php extension (PECL)
Now open your terminal and off we go:
Continue reading…
Google’s search algorithm update, codenamed “Google Caffeine” in set to launch in the coming days. Google Caffeine is said to stir up the Webmaster / SEO world with a slew of algorithm updates. Most predominantly, it will be much quicker than the current Google search and rely more on keyword strings in the page content, and it will make real-time search much more important.
The new focus on real-time search results means that sites that consistently ranked high will take a hit. This will give smart webmasters who understand the dynamic of real-time social media an excellent opportunity to markedly boost their Google rankings.
Here is a summary of what we know about Google Caffeine and it’s effect on SEO:
Page load speed will be important
The time it takes for a webpage to load is now important to rank high on Google. Studies have shown that improving page load speed results in improved user retention and increased conversions.
Check out Google’s Site Performance diagnostic tool in their Google Webmaster Accounts. Basically, it boils down to:
- Writing lean HTML and CSS code
- More intelligent use of Javascript
- Compressing html, css and Javascript
- Improve browser page caching
Continue reading…
One of the intricate aspects of open source software is in implementing support — where it is even possible to do so — for the wide realm of codecs, formats, and a plethora of proprietary technologies that users have come to rely on. One such technology is Microsoft’s Silverlight framework, which until early this year was not available to Linux users.
This changed in January, when the first version of the Moonlight Project was released, providing Linux users with Open Source Silverlight support. Also included, provided that Moonlight has been obtained via Novell and meets certain other conditions, is a license to Microsoft’s free but closed-source Media Pack, containing codecs needed to decode audio and video streams.
Continue reading…
Ever been without a DVD/CDROM or installation disk? Especially MacBook Air users undoubtedly come across this situation. This article will explain how to install Snow Leopard from an external device such as USB or disk drive.
You will need an appropriately sized external drive or USB Flash Drive, as the Snow Leopard install DVD’s size is about 6.2 gigabytes. An 8GB USB stick like the SanDisk Cruzer 8GB
is the perfect choice.
Now let’s plug in that USB stick and get started.
1. Start up Disk Utility and select your Flash Drive from the left side pane.
2. Select the Erase tab and set Format to Mac OS Extended (Journaled). It should be the first choice in the list. Set Name to Snow Leopard or OS X Install so you can easily keep track of it. Before you the Erase button, be sure that you copied any files or folders from the Flash Drive that you want to keep, as everything will get erased. You’ve been warned! Hit Erase.
Continue reading…
November 23rd, 2009 in
Mac,
Useful Stuff |
2 Comments
These instructions assume that you have a working Apache 2.2 / PHP 5.3 in place and want to add the php mcrypt module. It will work as a fresh install, but keep in mind that additional configuration steps after these instructions are necessary to get your webserver working properly. Those additional steps are omitted here, as there are countless resources available on the Internet.
1. If you don’t already have the mcrypt module (in /usr/lib), download the libmcrypt source code from sourceforge here. Then extract the downloaded file in a Terminal and move inside the created directory. (cd libmcrypt-2.5.8 in my case)
2. Execute the following lines in one command in your Terminal, if you have a 64bit version of Apache/PHP:
CFLAGS=”-arch x86_64″ \
CXXFLAGS=”-arch x86_64″ \
./configure –disable-posix-threads
(for 32 bit versions: ./configure –disable-posix-threads)
Continue reading…
Ever come across a situation, where you’d like to check all tables in a database and have them all repaired and optimized? My guess is yes.
In case you didn’t know, there is a helpful MySQL utility called mysqlcheck, available as of version 3.23.38. It does exactly what we need.
To check all tables in all databases for corruption and errors and also fix them in one go, this is your command:
mysqlcheck -u username -p password –check –optimize –auto-repair –all-databases
mysqlcheck executes statements like CHECK TABLE, REPAIR TABLE, ANALYZE TABLE, and OPTIMIZE TABLE and chooses the best statements for any given operation and storage engine.
Note that the operations complete a lot faster if you can afford to to disable any external services, especially if your database is large.
These instructions lead you thru the installation of the latest LAMP Stack on MacOS X Snow Leopard.
1 – Download the installation image from MySQL website here. Then double-click to mount and open the disk image.
2 – Install MySQL Server by double clicking the package “mysql-5.1.*****.pkg” and follow the menu, accepting the default values, unless you want to change something and know exactly what you’re doing.
3 – Install MySQL Startup Item by double-clicking the package “MySQLStartupitem.pkg” and follow the menu.
4 – Install MySQL Preference Pane by double-clicking the file “MySQL.prefPane” and follow the menu. This item will simplify the management of your SQL Server. You can now use the “System Preferences” panel to start and stop the database server.
5 – Enable the php module in your apache config file. You might know that Snow Leopard already ships with Apache 2.2 and PHP 5.3, but it needs a couple of tweaks to make it work smoothly. So, open /etc/apache2/httpd.conf and search for “php5_module”. Remove the comment (#) in front of the line, save and close the file, then restart apache (sudo apachectl restart)
Continue reading…
Installing true-type fonts in Ubuntu is an easy task. With literally thousands of free fonts available on the Internet, (from sites such as 1001 Free Fonts or DaFont), who could resist to add that extra spice to their documents or websites.
Ready? Here we go!
First, find and download your desired fonts into ~/Downloads/fonts. You may have to create that directory first. Then extract them and copy to the system fonts directory as follows:
cd /usr/share/fonts/truetype
sudo mkdir customFonts
cd customFonts
sudo cp ~/Downloads/fonts/*.ttf .
sudo chown root.root *.ttf
sudo mkfontdir
cd ..
fc-cache
And that’s it. If you had your favourite graphics program open during this process, you’ll likely need to restart it to see the added fonts.
Have fun!
Forgot your root password? Nice going. What now? Reinstall the machine from ground up? Sadly enough, I’ve seen this happening all too often while it’s surprisingly easy to change the password knowing the correct procedure. While this doesn’t work in all cases (like if you secured your machine with a GRUB password and forgot that as well), but here’s the procedure in case of a CentOS Linux machine.
Start off by rebooting your system. At the GRUB boot loader screen, move the highlighted entry with the arrow keys to interrupt the boot process. While the current boot entry is highlighted, press E and you can edit the kernel line.

Grub boot loader screen
Use the arrow key to highlight the line that starts with kernel, and press E to edit the kernel parameters. When you get to the screen below, append the number 1 at the end of the line. This will enable you to boot into single-user mode.

Edit GRUB boot loader entry
Next press Enter, then B, and the kernel will boot up into single-user mode. Once there you can run the passwd command, changing the password for user root:
prod-093# passwd
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully
Next time you boot up, use your newly created password to login.
It’s that season again when as usual, Fedora and Ubuntu are prepping up for new releases, with the Ubuntu crew having already released the first beta of Ubuntu 9.10, dubbed Karmic Koala. Although is only a beta release and still needs a bit of polish, there’s plenty to love.
Earlier this year, Canonical announced plans to improve the boot experience, the goal being to get the system up and running smoother and much faster. And Karmic Koala doesn’t disappoint, but the eventual goal of a 10-second startup time will have to wait until Ubuntu 10.04 is released in 2010.
The Ubuntu One client software, part of the Ubuntu One cloud storage tools, is designed to give you a simple way to backup, synchronize and share files over the web. Ubuntu One offers 2GB of free storage, and a 10GB option sets you back $10/month. Ubuntu One also offers public shared folders that other Ubuntu users can access natively from their PC, while non-Ubuntu users can access them via web browser.
Pidgin messaging client has been replaced with Empathy, something other GNOME distros have done as well. But Empathy isn’t just a new Instant Messaging client. It sports a much-improved framework known as Telepathy. More than just a Pidgin replacement, Telepathy offers video-chat and VOIP support, two things that aren’t even on Pidgin’s roadmap.
If you want to give this new beta release a spin yourself, download is available here. To upgrade from your existing 9.04 version, press “CTL+F2″, then type “update-manager -d”, hit enter and follow the instructions.