Skip to content

Instantly share code, notes, and snippets.

View elskwid's full-sized avatar
🤡

Don Morrison elskwid

🤡
View GitHub Profile
@elskwid
elskwid / mysqld_output.txt
Created November 5, 2010 09:49
Output of mysqld --verbose --info after installing with Homebrew
Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
--------------------------------- -----------------------------
abort-slave-event-count 0
allow-suspicious-udfs FALSE
auto-increment-increment 1
auto-increment-offset 1
automatic-sp-privileges TRUE
back_log 50
basedir /usr/local/Cellar/mysql/5.1.51/
@elskwid
elskwid / posterous_post_json.rb
Created November 5, 2010 20:41
Some examples of responses from posterous v2 api using ruby 1.8.7 with HTTParty
# Previously I was doing this:
def self.orig_recent_posts
response = get "/users/me/sites/primary/posts/public?page=1", AUTH
response.code == 200 ? response.parsed_response : nil
end
# Which would return this:
ruby-1.8.7-p302 > Posterous.orig_recent_posts.first["body_html"]
@elskwid
elskwid / warble.rb
Created November 18, 2010 17:20
Warble configuration for console
require 'lib/console/version'
# Warbler web application assembly configuration file
Warbler::Config.new do |config|
config.dirs = %w(app config db lib log vendor)
config.includes = FileList["config/sun-web.xml"]
config.excludes = FileList["console.conf", "console.conf.*.bak"]
Nov 19, 2010 3:15:11 PM org.apache.catalina.core.ApplicationContext log
INFO:
Processing HomeController#index (for 0:0:0:0:0:0:0:1%0 at 2010-11-19 15:15:09) [GET]
Rendering template within layouts/application
Rendering home/index
ActionView::TemplateError (stat.st_gid unsupported on this platform) on line #27 of app/views/home/index.html.haml:
24: .footer -
25: %p
@elskwid
elskwid / sequel_jdbc_backtrace.txt
Created November 22, 2010 20:29
Test of jdbc backtrace when a connection error happens.
Nov 22, 2010 12:25:58 PM org.apache.catalina.core.ApplicationContext log
SEVERE: Error: application initialization failed
org.jruby.rack.RackInitializationException: unable to create shared application instance
at org.jruby.rack.SharedRackApplicationFactory.init(SharedRackApplicationFactory.java:39)
at org.jruby.rack.RackServletContextListener.contextInitialized(RackServletContextListener.java:40)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
@elskwid
elskwid / rails_error_and_backtrace.txt
Created November 24, 2010 20:35
Startup with JRuby 1.5.5 app on Solaris under Tomcat 6
ActionView::TemplateError (stat.st_gid unsupported on this platform) on line #27 of app/views/home/index.html.haml:
24: .footer -
25: %p
26: ==There are currently #{link_to("#{Document.combined.active.count} total active documents", "/documents/active")}.
27: ==Of those, #{link_to("#{DigitalDocument.cached_unsigned_count} need an author signature", "/documents/not_signed")}
28: ==and #{link_to("#{DigitalDocument.cached_unwitnessed_count} are awaiting witnessing", "/documents/not_witnessed")}.
29:
30: %li.right
gems/gems/activesupport-2.3.5/lib/active_support/core_ext/file/atomic.rb:40:in `atomic_write'
@elskwid
elskwid / ps-unim-console-2010-12-14-175033.tdump
Created December 14, 2010 18:33
Tomcat hangs under JRuby 1.5.5 and Rails 2.3.5 (marshalling bug)
2010-12-14 17:50:33
Full thread dump OpenJDK Client VM (16.0-b13 mixed mode, sharing):
"ReferenceReaper" daemon prio=10 tid=0x08b25000 nid=0x63f4 in Object.wait() [0xb356a000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x7e951cd8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:133)
- locked <0x7e951cd8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:149)
Do you ...
* live in Reno-Sparks-Tahoe area?
* love the Ruby language?
* want to learn about Ruby?
* just like to code?
* hack on web stuff?
`gem list` on a GoDaddy shared host. Why bother?
I'm not sure how this list could bother me more. It's like the server is cryogenically frozen.
ruby 1.8.4 (2005-12-24) [i686-linux]
*** LOCAL GEMS ***
actionmailer (1.2.5)
actionpack (1.12.5)
@elskwid
elskwid / optlock_test.rb
Created January 9, 2011 10:12
Test the optimistic locking with Sequel
require 'rubygems'
require 'sequel'
require 'sqlite3'
require 'logger'
DB = Sequel.sqlite '', :loggers => [Logger.new($stdout)]
Sequel::Model.plugin :instance_filters
Sequel::Model.plugin :optimistic_locking