Skip to content

Instantly share code, notes, and snippets.

View rachelbaker's full-sized avatar

Rachel Baker rachelbaker

View GitHub Profile
@rachelbaker
rachelbaker / application-page.js
Created August 5, 2013 14:14
Custom JS functions for horizontal and vertical navigation menus for new design of Application Platform page.
/* ---------------------------------------------------------------------
Application Platform Page JavaScript
Target Browsers: All
Authors: Rachel Baker
------------------------------------------------------------------------ */
'use strict';
// Namespace Object
@rachelbaker
rachelbaker / newproj.rb
Created July 31, 2013 22:04
WordPress project setup script
#!/usr/bin/env ruby
# newproj.rb
#
# Initializes new WordPress projects.
# Creates new projects for each passed parameter.
#
# value - The String representing the project name
#
# Examples
@rachelbaker
rachelbaker / install-handlebars.md
Created May 29, 2013 13:58
Instructions for installing Node NPM and Handlebars on OSX
jQuery(document).ready(function($) {
function WidthChange(mq) {
if (mq.matches) {
// mobile accordian logic
} else {
// in case you need to add logic for when window width is larger than the mq variable
}
}
if (matchMedia) {
@rachelbaker
rachelbaker / install-yeoman-osx.md
Last active June 24, 2024 14:48
Instructions for installing Node NPM and Yeoman on OSX
/**
* ChromePHP Debugging
* Author: Rachel Baker
*/
function chromePHPDebugTool()
{
<?php
/**
* Snippet via @_mfields
* Check order of WordPress hooks
*/
function mfields_test_some_hooks() {
static $i = 1;
var_dump( $i . ' - ' . current_filter() );
$i++;
@rachelbaker
rachelbaker / debugActivationError.php
Created January 16, 2013 14:49
Debug WordPress plugin activation errors
/**
* Find unexpected output error during plugin activation.
* Writes file to /uploads/debug_report.html with buffer output.
*
* @author Rachel Baker <[email protected]>
*/
function debugActivationError(){
file_put_contents(ABSPATH. 'wp-content/uploads/debug_report.html', ob_get_contents());
}
add_action('activated_plugin','debugActivationError');
@rachelbaker
rachelbaker / Preferences.sublime-settings
Created December 4, 2012 13:59
Sublime Text 2 Preferences
{
"auto_complete_commit_on_tab": true,
"auto_complete_size_limit": 11943,
"auto_complete_with_fields": true,
"auto_id_class": true,
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/Obsidian Color Scheme/Obsidian.tmTheme",
"ensure_newline_at_eof_on_save": false,
"file_exclude_patterns":
@rachelbaker
rachelbaker / wp_csv_import.php
Created November 26, 2012 17:36
WordPress CSV importer upload form
<h3><?php echo __('Upload CSV'); ?></h3>
<form action="" method="post" enctype="multipart/form-data">
<tr>
<td width="20%"><?php echo __('Select file'); ?></td>
<td width="80%"><input type="file" name="file" id="file"/></td>
</tr>
<tr>