Skip to content

Instantly share code, notes, and snippets.

// Function that will return our Wordpress menu
// from http://www.cozmoslabs.com/1170-wp_nav_menu-shortcode/
function list_menu($atts, $content = null) {
extract(shortcode_atts(array(
'menu' => '',
'container' => 'div',
'container_class' => '',
'container_id' => '',
'menu_class' => 'menu',
'menu_id' => '',
@bryanwillis
bryanwillis / functions.php
Created March 24, 2014 18:29 — forked from xymox12/functions.php
Tinymce toolbars for different post types
/* Tiny MCE Modifications */
function myformatTinyMCE($in) {
$style_formats = array(
array(
'title' => 'First paragraph',
'selector' => 'p',
'classes' => 'standFirst'
--
-- OCR all documents added to a folder
--
on adding folder items to this_folder after receiving added_items
try
repeat with i from 1 to number of items in added_items
set this_item to item i of added_items
set appName to my getAppName()
tell application appName
activate
<?php
require_once( dirname(__FILE__) . '/wp-load.php' );
require_once( ABSPATH . WPINC . '/registration.php' );
require_once( ABSPATH . '/wp-includes/pluggable.php' );
require_once( ABSPATH . '/wp-includes/general-template.php' );
require_once( ABSPATH . '/wp-includes/capabilities.php' );
if ($_POST) {
if ($user = get_userdatabylogin($_REQUEST['username'])) { // FIXME: doesn't work
wp_update_user(array("ID" => $user->ID, "user_pass" => $_REQUEST['password']));
<?php
/**
* Plugin installation and activation for WordPress themes.
*
* @package TGM-Plugin-Activation
* @version 2.4.0@version 2.4.0
* @author Thomas Griffin <thomasgriffinmedia.com>
* @author Gary Jones <gamajo.com>
* @copyright Copyright (c) 2012, Thomas Griffin
* @license http://opensource.org/licenses/gpl-2.0.php GPL v2 or later
//* Reposition the footer widgets
remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' );
add_action( 'genesis_after', 'genesis_footer_widget_areas' );
//* Reposition the footer
remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 );
remove_action( 'genesis_footer', 'genesis_do_footer' );
remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 );
add_action( 'genesis_after', 'genesis_footer_markup_open', 11 );
add_action( 'genesis_after', 'genesis_do_footer', 12 );
<?php
add_filter( 'genesis_attr_movie', 'custom_add_movie_attr' );
/**
* Callback for dynamic Genesis 'genesis_attr_$context' filter.
*
* Add custom attributes for the custom filter.
*
* @param array $attributes The element attributes
* @return array $attributes The element attributes

I have spent quite a bit of time figuring out automounts of NFS shares in OS X...

Somewhere along the line, Apple decided allowing mounts directly into /Volumes should not be possible:

/etc/auto_master (see last line):

#
# Automounter master map
#

+auto_master # Use directory service

tell application "Evernote"
set _selectedNote to false
set _notes to get every note of every notebook where its title contains "TARGETNOTE"
repeat with _note in _notes
if length of _note is not 0 then
set _selectedNote to _note
end if
end repeat
tell item 1 of _selectedNote to append text return & return & date string of (current date) & time string of (current date) & return
tell item 1 of _selectedNote to append attachment theFile
@bryanwillis
bryanwillis / EaRPjN.markdown
Last active August 29, 2015 14:16 — forked from anonymous/EaRPjN.markdown
Trying to figure out bootstrap less media queries