Skip to content

Instantly share code, notes, and snippets.

View zachbrowne's full-sized avatar

Zach Browne zachbrowne

View GitHub Profile
@zachbrowne
zachbrowne / google-news-parser.php
Created July 11, 2011 03:48
Google News Parser for WordPress
<?php
/*
*
* Plugin Name: Google News Parser
* Plugin URI: http://zachbrowne.com
* Description: Imports news from Google and creates posts for them. For information regarding this
* plugin, please contact the developer: <strong>zachbrowne@gmail.com</strong>
* Version: 1.0
* Author: Zach Browne
<HTML>
<head> <title> My RSS Feed </title> </head>
<body>
<?
include 'rss_get.php';
?>
@zachbrowne
zachbrowne / example.css
Created July 16, 2011 17:24
Add RSS Icon Next to Feed in a Paragraph
.feed {
margin-left: 3px;
padding: 0 0 0 19px;
background: url("../images/feed-icon-14x14.png") no-repeat 0 50%;
}
@zachbrowne
zachbrowne / example.css
Created July 16, 2011 17:37
Add RSS Icons to a List of Feeds
.feed-list {
margin: 0 0 15px 15px;
padding: 0;
list-style-type: none;
}
.feed-list li {
margin: 0 0 10px 0;
padding: 0;
list-style-type: none;
@zachbrowne
zachbrowne / example.css
Created July 16, 2011 17:38
Simple RSS Button with CSS
.feed-button {
padding: 10px 0;
}
.feed-button a {
color: #666;
padding: 10px 15px 10px 36px;
background: #ccc url("../images/feed-icon-14x14.png") no-repeat 15px 50%;
border-top: 1px solid #e2e2e2;
border-right: 1px solid #818181;
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAxU+tMbtfZgEcPtd9bjLpCDp6LFM8apU0PrqUGYGD66yU5E73rcTUwbrHdPVT+HkYTLBBYZlQ8nki7m8asQq4uPyuoo2LL26ut6ZrCDrkCPcKbPKK75hSfJwjm1LqGTfbKcv112d/uqGUDtCiak0AeWOvoiZbISD2K5IT/dp67W0= rsa-key-20110926
@zachbrowne
zachbrowne / Ubuntu Commands Cheat Sheet
Created September 29, 2011 16:26
A collection of commands and bash script functions for Ubuntu that just make life easier.
# Commands to backup a website from root access to ssh with mysql database
cd to directory of website
# Compress
tar czf filename.tar.gz *
mysqldump -u root -ppassword databasename | gzip -9 > filename.sql.gz
# Decompress
tar xzf filename.tar.gz
gunzip filename.sql.gz
@zachbrowne
zachbrowne / Moving WordPress to Different Domain MYSQL Commands
Created October 8, 2011 03:58
Moving a WordPress website to a different domain MYSQL commands
# Run these three commands when moving your WordPress website from one domain to another
UPDATE wp_options SET option_value = replace(option_value, 'http://old-domain.com', 'http://new-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://old-domain.com','http://new-domain.com');
UPDATE wp_posts SET post_content = replace(post_content, 'http://old-domain.com', 'new-domain.com');
@zachbrowne
zachbrowne / Thesis Theme Snippets
Created October 8, 2011 23:16
Thesis Theme Snippets
# Add menu to footer
register_nav_menu('footer','Footer Menu');
function custom_footer_menu() {
wp_nav_menu(array(
'container' => '',
'menu_id' => 'footer_nav',
'fallback_cb' => 'thesis_nav_menu',
'theme_location' => 'footer',
));
}
@zachbrowne
zachbrowne / Thesis Framework Snippets
Created October 11, 2011 19:23
WordPress Thesis Framework custom_function.php file snippets.
# Move menu below header
remove_action('thesis_hook_before_header', 'thesis_nav_menu');
add_action('thesis_hook_after_header', 'thesis_nav_menu');
#