How to Find Postgres Log File and Postgres Data Directory from PSQL
If you want to find the location of your log file in Postgres, you'll need to hop into a Psql session..
psql dbname
Then it's as simple as running..
show data_directory ;
Which will output the data directory, in my case..
/Users/sea...
Written by Sean Behan on 05/25/2018
Non Standard Port Number with SSH and Git
Here is an example using the port 4567 to connect with over ssh and git
ssh remote add origin ssh://sean@seanbehan.com:4567/path/to/git
git push origin master
Written by Sean Behan on 06/17/2012
Email Obfuscation and Extraction from Text with Rails
There is a helper method for handling the obfuscation of email addresses in Rails.
mail_to "me@domain.com", "My email", :encode => "hex"
# => My email
If you want to then extract an email address(or all email addresses) from a block of text here is the...
Written by Sean Behan on 06/17/2012
Installing Sphinx Search Engine on Mac OS X... or ld: library not found for -lmysqlclient
If you are trying to install Sphinx on Mac OS X, it will most likely fail. The current version of MySQL bundled with Mac OS X is not supported and therefore, it will spit out the error message because it can't find the correct libraries.
ld: library no...
Written by Sean Behan on 06/17/2012
How to Split a Large File Into Smaller Files on OSX or Unix
Use the split command.
split -l 1000 name-of-file output/directory
You can set the number of lines (the "-l" flag) to split on and also the location of where the split files should be saved. Note, the output directory must already exists....
Written by Sean Behan on 10/08/2013