git clone <repo>
clone the repository specified by ; this is similar to "checkout" in some other version control systems such as Subversion and CVS
Add colors to your ~/.gitconfig file:
| /* | |
| The original files are 960x319. | |
| Image sizes to save: | |
| * 800x266 - Retina for 480x320 resolution (400 logical pixel wide panel areas) | |
| * 740x246 - Desktop and iPad | |
| * 616x205 - Retina for 320x480 resolution (308 logical pixel wide panel areas) | |
| * 400x133 - 480x320 resolution | |
| * 308x102 - 320x480 resolution |
| /* | |
| The original files are 960x319. | |
| Image sizes to save: | |
| * 800x266 - Retina for 480x320 resolution (400 logical pixel wide panel areas) | |
| * 740x246 - Desktop and iPad | |
| * 616x205 - Retina for 320x480 resolution (308 logical pixel wide panel areas) | |
| * 400x133 - 480x320 resolution | |
| * 308x102 - 320x480 resolution |
| // Get a reference to the image element | |
| var elephant = document.getElementById("elephant"); | |
| // Take action when the image has loaded | |
| elephant.addEventListener("load", function () { | |
| var imgCanvas = document.createElement("canvas"), | |
| imgContext = imgCanvas.getContext("2d"); | |
| // Make sure canvas is as big as the picture | |
| imgCanvas.width = elephant.width; |
| <?php | |
| function is_user_logged_in() { | |
| $loggedin = false; | |
| foreach ( (array) $_COOKIE as $cookie => $value ) { | |
| if ( stristr($cookie, 'wordpress_logged_in_') ) | |
| $loggedin = true; | |
| } | |
| return $loggedin; | |
| } | |
| if ( ! stristr($_SERVER['REQUEST_URI'], '/wp-admin') && ! stristr($_SERVER['REQUEST_URI'], '/wp-login.php') && ! is_user_logged_in() ) |
| <?php | |
| /* | |
| * A walker class to use that extends wp_dropdown_categories and allows it to use the term's slug as a value rather than ID. | |
| * | |
| * See http://core.trac.wordpress.org/ticket/13258 | |
| * | |
| * Usage, as normal: | |
| * wp_dropdown_categories($args); | |
| * |
| <?php | |
| /* | |
| * On first publish set a special date in advance in custom field | |
| */ | |
| add_action('transition_post_status','tanc_first_schedule_publish_set',10,3); | |
| function tanc_first_schedule_publish_set($new, $old, $post) { | |
| // REFERENCE | |
| // $new = new post status ('publish') | |
| // $old = old post status ('draft') |
| // Output Android Icons.jsx | |
| // 2012 Todd Linkner | |
| // License: none (public domain) | |
| // v1.0 | |
| // | |
| // This script is for Photoshop CS6. It outputs Android icons of the | |
| // following sizes from a source PSD at least 512px x 512px | |
| // | |
| // store: | |
| // Icon.png (512px x 512px) |
| /** | |
| * Intelligently replacement for print_r & var_dump. | |
| * | |
| * @param mixed $code | |
| * @param bool $output. (default: true) | |
| * @return $code | |
| */ | |
| function hm( $code, $output = true ) { |
| add_action( 'contextual_help', 'wptuts_screen_help', 10, 3 ); | |
| function wptuts_screen_help( $contextual_help, $screen_id, $screen ) { | |
| // The add_help_tab function for screen was introduced in WordPress 3.3. | |
| if ( ! method_exists( $screen, 'add_help_tab' ) ) | |
| return $contextual_help; | |
| global $hook_suffix; | |
| // List screen properties |