Skip to content

Instantly share code, notes, and snippets.

View heychriszappa's full-sized avatar

Chris Zappa heychriszappa

View GitHub Profile
@jaredatch
jaredatch / gist:5640664
Created May 24, 2013 01:05
Add Author Profile Fields to User Profile
<?php
/**
* Add Author Profile Fields to User Profile
*
* @since 1.0.0
* @param object $user
*/
function ja_user_fields( $user ) {
?>
<h3>Additional Information</h3>
@jonschlinkert
jonschlinkert / markdown-cheatsheet.md
Last active July 25, 2025 20:07
A better markdown cheatsheet.
@studiopress
studiopress / large-button-followers.html
Created October 7, 2013 12:28
Twitter "Follow" Button.
<a href="https://twitter.com/bgardner" class="twitter-follow-button" data-show-count="true" data-size="large">Follow @bgardner</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
@rickrduncan
rickrduncan / genesis-page-titles-html5.php
Last active August 1, 2022 11:16
How to remove page titles from Genesis child themes using XHTML and HTML5 methods.
<?php
//* Do NOT include the opening php tag
//* ALL EXAMPLES ON THIS PAGE USE THE NEW HTML5 METHOD
//* Remove page titles site wide (posts & pages) (requires HTML5 theme support)
remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
@jaredatch
jaredatch / gist:7184603
Created October 27, 2013 16:31
A few tricks to use for your local installs
<?php
/*------------------------------------------------------------------------------
The functions below are executed if the install is declared to be a
development environment.
The following constants should be set in the install's wp-config.php:
SITE_DEV - [true/false]
SITE_PROD_URL - primary root URL of the production site
------------------------------------------------------------------------------*/
@jaredatch
jaredatch / gist:9376451
Created March 5, 2014 20:59
Add new default avatar option
<?php
/**
* Add new avatar to be select as a default
*
* @since 1.0.0
* @param array $defaults
* @return array
*/
function ja_add_avatar_default( $defaults ) {
$new = get_stylesheet_directory_uri() . '/images/default-avatar.jpg';
@jaredatch
jaredatch / gist:9376496
Created March 5, 2014 21:01
Customize comment heading
<?php
/**
* Custom comment heading
*
* @since 1.0.0
* @param string $title
* @return string
*/
function ja_comment_heading( $title ) {
return '<h3><strong>' . get_comments_number() . ' Responses to</strong> ' . get_the_title() . '</h3>';
@n8henrie
n8henrie / txt_to_reminders.applescript
Last active March 10, 2025 22:35
Demonstration of using AppleScript with Reminders.app
--taken from http://benguild.com/2012/04/11/how-to-import-tasks-to-do-items-into-ios-reminders/#comment-1346894559
--set theFileContents to (read file "Users:n8henrie:Desktop:Reminders.txt") -- Change this to the path to your downloaded text file with your tasks in it! (Note the : instead of a / between folders) Or, just name them Reminders.txt and put them in your downloads folder
--set theLines to paragraphs of theFileContents
set theLines to {"task name 1", "task name 2"}
repeat with eachLine in theLines
tell application "Reminders"
set mylist to list "Your List Name"
tell mylist
make new reminder at end with properties {name:eachLine, due date:date "7/10/2014 3:00 PM"}
@mutewinter
mutewinter / FantasticReminders.md
Last active May 27, 2018 06:12
Fantastic Reminders - An Alfred Workflow to Add Reminders to Reminders.app via Fantastical

Workflow icon Fantastic Reminders

Alfred Workflow to add reminders to Reminders via Fantastical's amazing natural language processing.

Usage

r put laundry in dryer in 35 min
r wake up at 6:30am every day
r party on 1/1/2025 at 12am
// Smooth scrolling anchor links
function ea_scroll( hash ) {
var target = $( hash );
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
var top_offset = 0;
if ( $('.site-header').css('position') == 'fixed' ) {
top_offset = $('.site-header').height();
}
if( $('body').hasClass('admin-bar') ) {