This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This will redirect all date based archive to a page that does not exist, | |
// effectively disabling them, with a 404 error code | |
add_action( 'template_redirect', 'pu01_date_archive_not_found' ); | |
function pu01_date_archive_not_found() { | |
if ( is_date() ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Simple Metabox Example | |
* | |
* Validates string is under 20 characters | |
* | |
* Copyright (C) 2013 Jeff Sebring <http://jeffsebring.com> | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Gisted | |
Plugin URI: http://jeffsebring.com/wordpress/plugins/gisted | |
Description: Print your Github Gists as HTML on your WordPress blog | |
Author: Jeff Sebring | |
Version: 0.1.2 | |
Author URI: http://jeffsebring.com/ | |
Copyright 2012 Jeff Sebring |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
wget http://wordpress.org/latest.tar.gz | |
tar -zxvf latest.tar.gz | |
rm latest.tar.gz | |
mv wordpress __ | |
mv __/wp-content _ | |
echo "<?php" >> index.php | |
echo "define( 'WP_USE_THEMES', true );" >> index.php | |
echo "require('./__/wp-blog-header.php');" >> index.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function js_remove_dashboard_widgets() { | |
remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' ); | |
remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' ); | |
remove_meta_box( 'dashboard_primary', 'dashboard', 'side' ); | |
remove_meta_box( 'dashboard_secondary', 'dashboard', 'side' ); | |
remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' ); | |
remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' ); | |
remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' ); | |
remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version='1.0'?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<fontconfig> | |
<match target="font" > | |
<edit mode="assign" name="autohint"> <bool>true</bool></edit> | |
<edit mode="assign" name="hinting"> <bool>false</bool></edit> | |
<edit mode="assign" name="lcdfilter"> <const>lcddefault</const></edit> | |
<edit mode="assign" name="hintstyle"> <const>hintslight</const></edit> | |
<edit mode="assign" name="antialias"> <bool>true</bool></edit> | |
<edit mode="assign" name="rgba"> <const>rgb</const></edit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use the wp_enqueue_scripts hook to enqueue scripts and styles | |
add_action( 'wp_enqueue_scripts', 'mytheme_enqueue', 99999); | |
# Callback function | |
function mytheme_enqueue() | |
{ | |
wp_enqueue_script( 'mytheme', get_stylesheet_directory_uri() . '/javascripts/theme.js', array( 'jquery' ), '', 'footer' ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'init', function() | |
{ | |
register_post_type( 'code', | |
array( | |
'labels' => array( | |
'name' => _x( 'Code', 'post type general name' ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
server_name www.jeffsebring.com; | |
rewrite ^/(.*)$ http://jeffsebring.com/$1 permanent; | |
} | |
server { | |
#port 8080; | |
server_name jeffsebring.com; | |
access_log /PATH/logs/access/jeffsebring.com_access.log; | |
error_log /PATH/logs/errors/jeffsebring.com_error.log; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir /media/home | |
sudo cryptsetup luksOpen /dev/sda2 home | |
sudo mount /dev/mapper/home /media/home |