Skip to content

Instantly share code, notes, and snippets.

View slambert's full-sized avatar

Steve Lambert slambert

View GitHub Profile
@slambert
slambert / SelfControl Scheduling
Created June 1, 2010 01:33
applescript for scheduling selfcontrol - written by Karl James Pestka - see macosxhints artilce: http://www.macosxhints.com/article.php?story=20100801214648362
on run argv
set defaultTime to 1
try
set myTime to item 1 of argv as number
on error
set myTime to defaultTime
end try
tell application "Usable Keychain Scripting"
@slambert
slambert / modified page.php
Created June 17, 2010 06:16
These 2 files are the same except for line 50 and 51. How could I do this with a filter instead of using the modified page.php in my child theme. It seems inefficient to use so much code to essentially change 2 lines.
<?php
// calling the header.php
get_header();
// action hook for placing content above #container
thematic_abovecontainer();
?>
@slambert
slambert / rounded-accents.css
Created July 18, 2010 00:09
adding rounded accents to WPFolio
/* ROUNDED ACCENTS */
/* these create rounded corners on the container */
.container {
border-top-left-radius: 10px;
-moz-border-radius-topleft: 10px;
-webkit-border-top-left-radius: 10px;
border-top-right-radius: 10px;
-moz-border-radius-topright: 10px;
-webkit-border-top-right-radius: 10px;
/* NAV BACKGROUND STYLES change these colors to whatever you like */
.sf-menu li {
background: ;
}
.sf-menu li:hover, .sf-menu li.sfHover,
.sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active {
background: ;
}
.sf-menu li li, .sf-menu li li li {
Your Name
Where I live, State, etc
<h2>Education</h2>
<ul>
<li>2006</li>
<li><ul><li>Some Dumb Artschool | MFA, Studio Art</li></ul></li>
<li>2001</li>
//add to functions.php
// Make two columns: Render a block of text into two columns
function wpf_maketwocolumns($atts, $content = null) {
return '<div class="maketwocolumns">' . $content . '</div>';
}
add_shortcode("maketwocolumns", "wpf_maketwocolumns");
<?php
/*
Plugin Name: Relevant Taxonomies Widget
Plugin URI: http://github.com/slambert
Description: Displays a list of taxonomies related to the content of the post. And doesn't work.
Version: 0.1
Author: Steve Lambert
Author URI: http://visitsteve.com
*/
@slambert
slambert / gist:661561
Created November 3, 2010 19:30
functions.php
<?php
// customize admin footer text
function wpfolio_admin_footer() {
echo 'Thank you for creating with <a href="http://wordpress.org/" target="_blank">WordPress</a>. | <a href="http://codex.wordpress.org/" target="_blank">Documentation</a> | <a href="http://wordpress.org/support/forum/4" target="_blank">Feedback</a> | <a href="http://wpfolio.visitsteve.com/">Theme by WPFolio</a>';
}
add_filter('admin_footer_text', 'wpfolio_admin_footer');
// Thumbnail Function
function get_thumb ($post_ID){
@slambert
slambert / functions.php
Created November 30, 2010 20:45
Excerpt of functions.php for calling a Javascript file in your wordpress theme
/////////////////////////////////////////////
// Add custom jQuery plugins and functions //
/////////////////////////////////////////////
function aaathematic_scripts() { // name the function something unique to your theme
if ( !is_admin() ) { // instruction to only load if it is not the admin area
wp_enqueue_script('sample_js_file', get_bloginfo('stylesheet_directory') . '/js/aaathematic_scripts.js', array('jquery'), '20100329' );
// the above line includes the name of the file, where the file is in relation to the stylesheet directory, specifying that you're using jQuery and a version number for your file
}