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
| SET SQL_MODE = ''; | |
| ALTER TABLE `wp_posts` CHANGE `post_date` `post_date` DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00'; | |
| ALTER TABLE `wp_posts` CHANGE `post_date_gmt` `post_date_gmt` DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00'; | |
| ALTER TABLE `wp_posts` CHANGE `post_modified` `post_modified` DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00'; | |
| ALTER TABLE `wp_posts` CHANGE `post_modified_gmt` `post_modified_gmt` DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00'; |
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
| require "minitest/autorun" | |
| module HasConstant | |
| CONST = "const" | |
| end | |
| # ================================================ | |
| # Pass: | |
| class TheTest1 < Minitest::Test | |
| include HasConstant |
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
| ruby -e '$<.scan(/Installing (\S+) (\S+)/).each do |pkg, ver| system "gem uninstall -v #{ver} #{pkg}"; end' bundler_output.log |
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
| # Put these on wp-config.php | |
| define('WP_DEBUG', true); | |
| define('WP_DEBUG_LOG', true); | |
| function custom_exception_handler($exception) | |
| { | |
| $logmsg = "Uncaught exception: " . $exception->getMessage() . "\n" . $exception->getTraceAsString() . "\n"; | |
| trigger_error($logmsg, E_ERROR); | |
| if (WP_DEBUG) { | |
| echo($logmsg); |
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
| public function stdclass_to_array($stdclass) { | |
| return json_decode(json_encode($stdclass), true); | |
| } |
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
| module Rack::Utils | |
| # to avoid this error: | |
| # home/rack-1.4.5/lib/rack/utils.rb line 127 | |
| # raise TypeError, "expected Hash (got #{params[k].class.name}) for param `#{k}'" unless params_hash_type?(params[k]) | |
| unless defined? normalize_params_without_error_passthru | |
| alias normalize_params_without_error_passthru normalize_params | |
| module_function :normalize_params_without_error_passthru | |
| end | |
| def normalize_params(params, *args) |
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
| require('httpful/bootstrap.php'); | |
| $resp = \Httpful\Request::post($url)->sendsJson()->body($json)->send(); | |
| <b>Fatal error</b>: | |
| Uncaught exception 'Exception' with message 'Unable to parse response code from HTTP response due to malformed response' in httpful/src/Httpful/Response.php:128 | |
| Stack trace: | |
| #0 httpful/src/Httpful/Response.php(38): Httpful\Response->_parseCode('HTTP/1.1 100 Co...') | |
| #1 httpful/src/Httpful/Request.php(175): Httpful\Response->__construct('HTTP/1.1 200 OK...', 'HTTP/1.1 100 Co...', Object(Httpful\Request)) |
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
| class ActiveRecord::Reflection::AssociationReflection | |
| def derive_class_name | |
| cn = "" | |
| parent = active_record.parent | |
| unless parent == Object | |
| cn << "#{parent.name}::" | |
| end | |
| cn << name.to_s.camelize | |
| cn = cn.singularize if collection? | |
| cn |
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
| Index: daemontools-0.76/src/supervise.c | |
| =================================================================== | |
| RCS file: /home/shirai/root/cvs/project/other/daemontools/daemontools-0.76/src/supervise.c,v | |
| retrieving revision 1.1.1.1 | |
| retrieving revision 1.4 | |
| diff -u -r1.1.1.1 -r1.4 | |
| --- daemontools-0.76/src/supervise.c 16 Dec 2001 02:54:52 -0000 1.1.1.1 | |
| +++ daemontools-0.76/src/supervise.c 30 May 2002 07:33:07 -0000 1.4 | |
| @@ -15,6 +15,10 @@ | |
| #include "iopause.h" |
NewerOlder