Nino Müller

Install Spotify on Ubuntu 11.10

First you should add the Spotify repository to a new file. Open the file with vim
sudo vi /etc/apt/sources.list.d/spotify.list

And add the following line:
deb http://repository.spotify.com stable non-free

Now you need to verify the packages with the key server:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4E9CFF4E

And install the app:
sudo apt-get update
sudo apt-get install spotify-client-qt

Now you need to add three libraries to make playback work. The libraries are somehow missing from the Ubuntu 11.10 libraries, so you can try to find them somewhere else.

Integrate WordPress into CakePHP

Basic Installation

  • Download the current WordPress version and extract it.
  • Move the extracted folder to app/webroot/blog
  • Navigate to http://yourdomain.com/app/webroot/blog/install.php and install WordPress normally. If you use the same database as for the rest of the CakePHP application I would recommend to use a DB-Prefix like wp_.
  • Move to http://yourdomain.com/app/webroot/blog/wp-admin and login with the username and password you provided. Go to Settings > General and change WordPress address (URL) and Site address (URL) to http://yourdomain.com/blog.
  • Open app/webroot/blog/.htaccess and change it accordingly to your needs

RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
  • Open /.htaccess and change it

RewriteEngine on
RewriteBase /
RedirectMatch temp ^/blog/wp-admin$ http://yoursite.com/blog/wp-admin/
RewriteRule blog$ /blog/ [L]
RewriteRule blog/wp-admin$ /blog/wp-admin/ [L]
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]

Some tipps

  • Use the same style.css and reference one from the other with @import(path/to/other/css)
Posted in Programming | Tagged , , | 1 Comment