Posts

Showing posts from 2011

PHP and MySQL Pagination

PHP/MySQL select data and split on pages Found this useful article on howto split MySQL records onto pages. So if you want to show only 20 records per page then follow the link.

Datasource Control Timeout (ASP.NET WebForms)

Below is a useful snipit of code, it sets the timeout for DataSource controls. Replace SqlDataSource with the ID of the datasource. Protected Sub SqlDataSource_Selecting(sender As Object, e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs) Handles SqlDataSource.Selecting e.Command.CommandTimeout = 1000 End Sub

CSV Splitter

Found this very useful CSV file splitter for files over 65536 rows (excel before 2007) or 1048576 rows (excel 2007+). See the original forum thread here or download here

Catch all non-existant users in Postfix

To catch all emails to unknown users add a new user e.g. catchall. In the postfix config set: luser_relay = catchall local_recipient_maps =

Postfix Admin

http://postfixadmin.sourceforge.net/ Web based admin for postfix, probably better than using webmin. Need to test.

Useful Firefox Tweet

http://bmdixon.wordpress.com/2007/11/06/change-default-google-search-in-firefox/ Change search bar to search Google UK in Firefox Update: This didn't seem to work after all. Will make sure I've not missed anything. Update Update: Found this useful link instead. If you want to change anything on it you'll find it in C:\Users\USERNAME\AppData\Roaming\Mozilla\Firefox\Profiles\PROFILE.default\searchplugins\ https://addons.mozilla.org/en-US/firefox/addon/google-uk-the-web/

Forward (pipe) emails through PHP in postfix

http://jeroensmeets.net/setup-postfix-to-forward-incoming-email-to-php/ Useful blog post on how to forward (pipe) email through PHP in postfix. Found this as it's a feature used by Active Campaign but its not covered by their help files.

Useful Web Garden Article

http://nicholas.piasecki.name/blog/2009/02/on-web-gardens-aspnet-and-iis-60/ A very useful article about IIS 6 web gardens. Don't know how relivant it is now but could be worth a look.

Remove Comments RSS Feed from Wordpress Version 3.x

Below is the code to remove the comments rss feed but keep the normal rss feed. Put this code in the functions.php file in your template. If there is no functions.php file then add one placing the code between <?php and ?> add_theme_support('automatic-feed-links'); remove_action( 'wp_head', 'feed_links', 2 ); remove_action( 'wp_head', 'feed_links_extra', 3 ); add_action( 'wp_head', 'threedmg_feed_links', 2 ); /**  * Display the links to the general feeds.  *  * @since 2.8.0  *  * @param array $args Optional arguments.  */ function threedmg_feed_links( $args = array() ) {     if ( !current_theme_supports('automatic-feed-links') )         return;     $defaults = array(         /* translators: Separator between blog name and feed type in feed links */         'separator'    => _x('&raquo;', 'feed link'),         /* translators: 1: blog title, 2: separator (raquo) */  

SMTP on PORT 587

Found this informative link on the alternative to port 25 for email. http://www.mostlygeek.com/tech/smtp-on-port-587/ Very useful if your ISP blocks port 25.

SYSTEMced Error

Found this very useful article on the systemced error http://jayroos.com/tech/recovering-systemced-error .