This file contains hidden or 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
| /* ~/Library/KeyBindings/DefaultKeyBinding.Dict | |
| This file remaps the key bindings of a single user on Mac OS X 10.5 to more | |
| closely match default behavior on Windows systems. This makes the Command key | |
| behave like Windows Control key. To use Control instead of Command, either swap | |
| Control and Command in Apple->System Preferences->Keyboard->Modifier Keys... | |
| or replace @ with ^ in this file. | |
| Here is a rough cheatsheet for syntax. | |
| Key Modifiers |
This file contains hidden or 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 RW_Delete_Entry { | |
| function __construct() { | |
| if( ! property_exists( 'GFCommon', 'version' ) || ! version_compare( GFCommon::$version, '1.8.5.8', '>=' ) ) | |
| return; | |
| add_filter( 'gform_tooltips', array( $this, 'add_delete_tooltip') ); | |
| add_filter( 'gform_form_settings', array( $this, 'add_delete_setting' ), 10, 2 ); | |
| add_action( 'gform_pre_form_settings_save', array( $this, 'save_delete_setting' ), 10 ); | |
| add_action( 'gform_after_submission', array( $this, 'maybe_delete_form_entry' ), 15, 2 ); |
This file contains hidden or 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
| #!/bin/sh | |
| # Set DB Constants | |
| DBHOST="localhost" | |
| DBUSER="root" | |
| DBPASS="123" | |
| DBNAME="wp_$1" | |
| # Set WP Constants | |
| ADMIN_NAME="my_admin_account" |
This file contains hidden or 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 | |
| /* | |
| Usage: | |
| cache_fragment_output( 'unique-key', 3600, function () { | |
| functions_that_do_stuff_live(); | |
| these_should_echo(); | |
| }); | |
| */ | |
| function cache_fragment_output( $key, $ttl, $function ) { |
This file contains hidden or 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
| #!/bin/sh | |
| git filter-branch --env-filter ' | |
| an="$GIT_AUTHOR_NAME" | |
| am="$GIT_AUTHOR_EMAIL" | |
| cn="$GIT_COMMITTER_NAME" | |
| cm="$GIT_COMMITTER_EMAIL" | |
| if [ "$GIT_COMMITTER_EMAIL" = "your@email.to.match" ] |
This file contains hidden or 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
| function getPicture(the_user_id, your_div_id){ | |
| var apiKey = "YOUR-API-KEY"; // replace this with your API key | |
| var url_to_a_photo_head = "http://api.flickr.com/services/rest/?method=flickr.photos.getSizes&api_key="+apiKey+"&photo_id="; | |
| var url_to_a_photo_tail = "&format=json&jsoncallback=?"; | |
| // get an array of random photos | |
| $.getJSON( | |
| "http://api.flickr.com/services/rest/", |
This file contains hidden or 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: R Debug | |
| Description: Set of dump helpers for debug. | |
| Author: Andrey "Rarst" Savchenko | |
| Author URI: https://www.rarst.net/ | |
| License: MIT | |
| */ |
This file contains hidden or 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
| Tutorial for compiling the Compass.app (http://compass.handlino.com/) | |
| ===================================================================== | |
| Java installed? | |
| java -version | |
| Load jRuby (for example JRuby 1.6.5.1 Binary .zip) | |
| http://jruby.org/download | |
| Unzip jRuby to `/usr/local/` |
This file contains hidden or 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 | |
| /* | |
| This function assumes a custom field named 'expiration' with a human friendly date/time. | |
| */ | |
| function is_post_expired($post_ID = null){ | |
| if(!$post_ID) global $post; | |
This file contains hidden or 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
| function is_blog () { | |
| global $post; | |
| $posttype = get_post_type($post ); | |
| return ( ((is_archive()) || (is_author()) || (is_category()) || (is_home()) || (is_single()) || (is_tag())) && ( $posttype == 'post') ) ? true : false ; | |
| } | |
| Usage: | |
| <?php if (is_blog()) { echo 'You are on a blog page'; } ?> |
NewerOlder