Skip to content

Instantly share code, notes, and snippets.

View jonathonbyrdziak's full-sized avatar
🔥
Scaling Businesses with Marketing Technology

Jonathon Byrdziak jonathonbyrdziak

🔥
Scaling Businesses with Marketing Technology
View GitHub Profile
@jonathonbyrdziak
jonathonbyrdziak / get_the_page_title.php
Created August 24, 2011 18:13
Wordpress special title creation
<?php
/**
* Function is responsible for constructing a comprehensive
* page title based off of the currently viewed page.
*
* This function should be saved to your functions.php file
* This function relies on another gist:
* https://gist.github.com/1168688
*
@jonathonbyrdziak
jonathonbyrdziak / bgFileInput.js
Created August 24, 2011 22:40
A function that uploads images using ajax. This is a quick and simple extension of $.ajax using jquery
/**
* Function is responsible for showing the filename when a new
* file is chosen
*
*/
(function($) { // block scope
$.fn.bgFileInput = function(){
return $(this).each(function(){
@jonathonbyrdziak
jonathonbyrdziak / apl_the_content.php
Created August 25, 2011 19:19
This is a wordpress function that is based off of my bootstrap function which will allow you to display a custom page template.
<?php
add_filter('the_content', 'apl_the_content', 20, 1);
/**
*
* @param unknown_type $content
* @return string|unknown
*/
function apl_the_content( $content )
{
@jonathonbyrdziak
jonathonbyrdziak / installation
Created September 14, 2011 18:58
Installation procedures for CentOs 6.1
# I've moved from debian to CentOs for various reasons. Mostly the support for hosting products such as cpanel.
# I setup new servers what feels like on a daily basis. So this is my install procedures
# vi is an editor.
vi /etc/yum.repos.d/remi-enterprise.repo
# make sure to hit "i" key prior to pasting.
# when done with pasting hit 'esc' and type ':wq'
###### paste in these lines #####
@jonathonbyrdziak
jonathonbyrdziak / CustomWidgetFile.php
Last active September 29, 2022 22:00
EMPTY WIDGET Plugin code to create a single widget in wordpress.
<?php
/**
* Duplicate this file as many times as you would like, just be sure to change the
* Empty_Widget class name to a custom name of your choice. Have fun! redrokk.com
*
* Plugin Name: Empty Widget
* Description: Single Widget Class handles all of the widget responsibility, all that you need to do is create the html. Just use Find/Replace on the Contact_RedRokk_Widget keyword to rebrand this class for your needs.
* Author: RedRokk Interactive Media
* Version: 1.0.0
* Author URI: http://www.redrokk.com
@jonathonbyrdziak
jonathonbyrdziak / relationship.class.php
Created September 21, 2011 15:30
Relationship API
<?php
/**
* @Author Anonymous
* @link http://www.redrokk.com
* @Package Wordpress
* @SubPackage Relationships
*
* @version 2.0
*/
@jonathonbyrdziak
jonathonbyrdziak / redrokk-menu.php
Created September 21, 2011 16:18
This function properly determines that the current viewed page is a child of the primary menu tag
<?php
/**
* @Author Jonathon byrd
* @link http://www.redrokk.com
* @Package Wordpress
* @SubPackage Theme
* @copyright Proprietary Software, Copyright RedRokk Incorporated. All Rights Reserved
* @Since 1.0.0
*
*/
@jonathonbyrdziak
jonathonbyrdziak / file_get_or_get_cached
Created October 8, 2011 03:12
Quick little caching script that will update your local copy of a file every day. If the file cannot be found, then it loads the outdated cache.
<?php
/**
*
* @param unknown_type $file
*/
function terack_cache( $file, $refresh = false ) {
$hash = md5($file);
$cachedir = dirname(dirname(__file__))."/cache/";
@jonathonbyrdziak
jonathonbyrdziak / Instructions
Created October 10, 2011 08:02
The perfect magento installation on CentOS 6
#
# @author Jonathon byrd
#
############################################################
# first things first, set your iptables for a web server. If you jack these
# up you don't want to have to re-install your os after doing much more.
# @see http://www.thegeekstuff.com/2011/06/iptables-rules-examples/
# and
# @see https://help.ubuntu.com/community/IptablesHowTo
@jonathonbyrdziak
jonathonbyrdziak / PageController.php
Created December 2, 2011 17:59
Override Magento CMS Page Controller
<?php
/**
* @Author RedRokk Interactive Media
* @link http://www.redrokk.com
* @Package RedRokk
* @SubPackage ShareThis
* @copyright Proprietary Software, Copyright RedRokk Incorporated. All Rights Reserved
* @Version 0.0.1
*
* RedRokk ShareThis PageController