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
| ### Keybase proof | |
| I hereby claim: | |
| * I am scribu on github. | |
| * I am scribu (https://keybase.io/scribu) on keybase. | |
| * I have a public key whose fingerprint is 2C8A 343A FDCC DDD2 6442 CCF1 8219 7F75 BDAF B501 | |
| To claim this, I am signing this object: |
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
| <html> | |
| <head> | |
| <title>Negative Feedback</title> | |
| <style> | |
| body { | |
| background: black; | |
| } | |
| .half { | |
| float: left; |
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
| import random | |
| DOORS = set([1, 2, 3]) | |
| def play(picked_door, do_switch): | |
| door_with_car = random.sample(DOORS, 1)[0] | |
| revealed_door = random.sample(DOORS.difference([door_with_car]), 1)[0] | |
| if do_switch: |
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: Category Custom Fields | |
| Author: scribu | |
| */ | |
| class Category_Custom_Fields { | |
| function init() { |
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 | |
| /** | |
| * Copy entire sidebar configuration from one site to another | |
| * | |
| * @param int $old_site The id of the original site | |
| * @param int $old_site The id of the site to copy the widgets to | |
| */ | |
| function copy_widgets($old_site, $new_site) { | |
| global $wpdb, $blog_id; |
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: Better Deprecation Warnings | |
| Author: scribu | |
| Version: 1.0 | |
| */ | |
| class Backtrace_Deprecated { | |
| function init() { |
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 | |
| function locate_skin_url( $name ) { | |
| $dir = false === strpos($name, '.css') ? 'js' : 'css'; | |
| if ( file_exists(STYLESHEETPATH . "/$dir/$name")) { | |
| $url = get_bloginfo('stylesheet_directory') . "/$dir/$name"; | |
| } elseif ( file_exists(TEMPLATEPATH . "/$dir/$name") ) { | |
| $url = get_bloginfo('template_directory') . "/$dir/$name"; | |
| } else { |
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
| # add these lines in your .htaccess file | |
| php_value memory_limit 128M | |
| php_value upload_max_filesize 128M | |
| php_value post_max_size 128M | |
| php_value max_execution_time 120 |
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 | |
| function wp_query_debug() { | |
| global $wp, $wp_query; | |
| echo '<pre>'; | |
| var_dump($wp->matched_rule); | |
| print_r($wp_query); | |
| echo '</pre>'; | |
| } |
OlderNewer