Skip to content

Instantly share code, notes, and snippets.

View sfgeorge's full-sized avatar

Stephen George sfgeorge

View GitHub Profile
@sfgeorge
sfgeorge / gist:1464144
Created December 12, 2011 01:42
SSL rake error
# Step 1. Use a system with an outdated SSL CA file
# Step 2. Run the toadhopper integration rake tasks:
bundle exec rake test AIRBRAKE_API_KEY=$AIRBRAKE_API_KEY AIRBRAKE_FULL_TEST=1
# Output:
Loaded suite /usr/local/rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2.2/lib/rake/rake_test_loader
Started
...E
@sfgeorge
sfgeorge / ca-bundle.crt
Created December 12, 2011 01:03
Example outdated root CA list file that fails to verify https://airbrake.io
# This is a bundle of X.509 certificates of public Certificate
# Authorities. It was generated from the Mozilla root CA list.
#
# Source: mozilla/security/nss/lib/ckfw/builtins/certdata.txt
#
# Generated from certdata.txt RCS revision 1.39
#
Certificate:
Data:
Version: 1 (0x0)
@sfgeorge
sfgeorge / gist:1237573
Created September 23, 2011 14:57
Problems using logging :formatter in daemon mode
/Users/sgeorge/.rvm/gems/ruby-1.9.2-p180/gems/adhearsion-1.2.1/lib/adhearsion/initializer/configuration.rb:72:in `logging': undefined method `count' for #<Log4r::FileOutputter:0x007
fbd31d2ec40> (NoMethodError)
from /Users/sgeorge/Code/ifbyphone/cloudvox/apptastic/config/adhearsion.rb:44:in `block in <top (required)>'
from /Users/sgeorge/.rvm/gems/ruby-1.9.2-p180/gems/adhearsion-1.2.1/lib/adhearsion/initializer/configuration.rb:28:in `configure'
from /Users/sgeorge/Code/ifbyphone/cloudvox/apptastic/config/adhearsion.rb:28:in `<top (required)>'
from /Users/sgeorge/.rvm/gems/ruby-1.9.2-p180/gems/adhearsion-1.2.1/lib/adhearsion/initializer.rb:272:in `load'
from /Users/sgeorge/.rvm/gems/ruby-1.9.2-p180/gems/adhearsion-1.2.1/lib/adhearsion/initializer.rb:272:in `block in load_all_init_files'
from /Users/sgeorge/.rvm/gems/ruby-1.9.2-p180/gems/adhearsion-1.2.1/lib/adhearsion/initializer.rb:272:in `each'
from /Users/sgeorge/.rvm/gems/ruby-1.9.2-p180/gems/adhears
@sfgeorge
sfgeorge / gist:1217501
Created September 14, 2011 19:18
Playing around with #ahn_log
@call.call.ahn_log 'Calling @call.call.ahn_log with a string'
@call.call.ahn_log { 'Calling @call.call.ahn_log with a block' } # This does not get logged
@call.call.ahn_log.http.info 'Calling @call.call.ahn_log.http.info with a string' # This does not log call context
@call.call.ahn_log.http.info { 'Calling @call.call.ahn_log.http.info with a block' } # This does not log call context
# Yields:
=begin
INFO sipserdevphp5b7d00498: Calling @call.call.ahn_log with a string
INFO http: Calling @call.call.ahn_log.http.info with a string
INFO http: Calling @call.call.ahn_log.http.info with a block
<?php
class Foo {};
$a = new Foo;
var_dump($a instanceof stdClass); // returns FALSE
?>
<?php
class A {
public $foo = null;
public function getFooClass() {
return get_class(); // null param means "What's *my* class?"
}
}
$a = new A();