⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
# This is a template .gitignore file for git-managed WordPress projects. | |
# | |
# Fact: you don't want WordPress core files, or your server-specific | |
# configuration files etc., in your project's repository. You just don't. | |
# | |
# Solution: stick this file up your repository root (which it assumes is | |
# also the WordPress root directory) and add exceptions for any plugins, | |
# themes, and other directories that should be under version control. | |
# | |
# See the comments below for more info on how to add exceptions for your |
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
// For 403 @ /admin/settings/customerror | |
// Title: Access Denied | |
<?php global $user; // http://www.kinetasystems.com/blog/creating-custom-error-pages-in-drupal ?> | |
<?php if ($user->uid): ?> | |
<p>Sorry <?php print $user->name; ?>, you don't have permission to view the page you've just tried to access.</p> | |
<p>If you feel that you have received this message in error, please | |
<a href="/about">contact us</a> with specific details so that we may review your access to this web site.</p> | |
<p>Thanks</p> | |
<?php else: ?> | |
<p>This page may be available to clients and registered users only. Please select from one of the other options available to you below.</p> |
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 | |
class QueryStringTest extends PHPUnit_Framework_TestCase { | |
/** | |
* @covers remove_querystring_var | |
*/ | |
public function testRemoveQueryStringVar() { | |
// tests without any other querystring params |
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: Disable plugins when doing local dev | |
Description: If the WP_LOCAL_DEV constant is true, disables plugins that you specify | |
Version: 0.1 | |
License: GPL version 2 or any later version | |
Author: Mark Jaquith | |
Author URI: http://coveredwebservices.com/ | |
*/ |
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 | |
/** | |
* Duplicate this file as many times as you would like, just be sure to change the | |
* Empty_Widget class name to a custom name of your choice. Have fun! redrokk.com | |
* | |
* Plugin Name: Empty Widget | |
* Description: Single Widget Class handles all of the widget responsibility, all that you need to do is create the html. Just use Find/Replace on the Contact_RedRokk_Widget keyword to rebrand this class for your needs. | |
* Author: RedRokk Interactive Media | |
* Version: 1.0.0 | |
* Author URI: http://www.redrokk.com |
Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications
like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.
open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html
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_filter( 'template_include', 'ja_template_include' ); | |
/** | |
* Apply a template to all subcategories of a certain parent category. | |
* | |
* @author Jared Atchison | |
* @link http://www.jaredatchison.com/2011/10/02/taking-advantage-of-the-template_include-filter/ | |
* | |
* @param string $template Existing path to template file | |
* @return string Potentially amended path to template file |
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
for f in ~/Dropbox/bash/*; do source $f; done |
There are some common hickups I see in the day-to-day use of Git that can be fairly easily remedied by the liberal use of local branches.
When I start any new work (or at the very least before I commit my work), I create a new local branch named for the feature on which I'm working.
$ git co -b robotic-turtles
OlderNewer