Skip to content

Instantly share code, notes, and snippets.

View gr4y's full-sized avatar

Sascha Wessel gr4y

View GitHub Profile
@gr4y
gr4y / deployer.rake
Created April 1, 2012 09:12 — forked from morgoth/deployer.rake
Rake task to copy local files to remote server via FTP
# Rake task to copy local files to remote server via FTP
# required credentials.yml file, that contains keys:
# server, username, password
require "net/ftp"
require "yaml"
class FTPClient
attr_reader :remote_path
@gr4y
gr4y / gist:1004026
Created June 2, 2011 06:39 — forked from bueltge/gist:998648
Example for add a Custom Post Type to the WordPress Loop
// add custom post type to wp loop
add_filter( 'pre_get_posts', array(&$this, 'add_to_query') );
// ads to query
function add_to_query( $query ) {
if ( is_admin() || is_preview() )
return;
//if ( is_home() || is_front_page() && ( false == $query->query_vars['suppress_filters'] ) ) {