Install Sphinx on Ubuntu
It's a pretty straightforward process. Download the source and compile it. There isn't a package for it so here are the commands.
wget http://sphinxsearch.com/downloads/sphinx-0.9.8.1.tar.gz
tar xzvf sphinx-0.9.8.1.tar.gz
cd sphinx-0.9.8.1/
./configure...
Written by Sean Behan on 06/17/2012
How to Parse Query Strings in PHP
Here is a quick snippet for parsing query strings in PHP. You can use the `parse_url` and `parse_str` methods. `parse_str` will create a variable for you populated with results.
$url = "http://www.seanbehan.com/path/?param=key";
parse_str(parse_url...
Written by Sean Behan on 12/04/2017
Quick Syntax to Pipe an SQL Query Directly to a file
Here is a quick way to put the contents of a database table into a simple text file. This could be handy if for example, you just want to grab some emails and pop the results into a simple csv file. Your sql statement can be as creative as sql allows. All...
Written by Sean Behan on 06/17/2012
How to Import/Export a Database from One Heroku App to Another Heroku App
Heroku is awesome! Let's say we want to copy a production database to a staging database.
We can use the `pg:backups:restore` command to accomplish this. Here is an example. For the source database we are using the `production-app-name` and for stagi...
Written by Sean Behan on 03/07/2017
Running Gem Server to View Docs for Ruby Libraries on Localhost
gem server
will boot up documentation on port 8808 by default pass it the -p flag followed by the port number to change.
gem server -p3000
Written by Sean Behan on 06/17/2012