Skip to content

Instantly share code, notes, and snippets.

View jlindley's full-sized avatar

Jim Lindley jlindley

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jlindley on github.
  • I am jlindley (https://keybase.io/jlindley) on keybase.
  • I have a public key whose fingerprint is 6F20 45BA 061A 1322 2371 B26C E7F4 3B36 6BB8 21B2

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am jlindley on github.
  • I am jlindley (https://keybase.io/jlindley) on keybase.
  • I have a public key whose fingerprint is 6160 F1E7 5247 F373 9734 B015 DC65 B728 05C8 E97E

To claim this, I am signing this object:

@jlindley
jlindley / emerge-failure.txt
Created July 31, 2012 18:21
nginx-1.0.15-r2 Failure
ip-10-112-238-171 ~ # eix-sync
* Running emerge --sync
>>> Starting rsync with rsync://174.129.241.164/portage/2009a...
>>> Checking server timestamp ...
receiving incremental file list
timestamp.chk
Number of files: 1
Number of files transferred: 1
Total file size: 32 bytes
@jlindley
jlindley / b.bash
Created January 18, 2012 21:34
Bundle check then bundle install if needed, then bundle exec.
#!/usr/bin/env bash
(bundle check || bundle --local) && bundle exec "$@"
@jlindley
jlindley / descriptive_sql_load_log.rb
Created July 19, 2011 22:44 — forked from JackDanger/descriptive_sql_load_log.rb
Let Rails display file names and line numbers for log activity.
module ActiveRecord
module ConnectionAdapters
class AbstractAdapter
protected
# Turn:
# User Load (6.3ms) SELECT * FROM "users"
# Into:
# User Load /app/views/_partial.erb:27 (6.3ms) in `_app_views_partial_erb` SELECT * FROM "users"
require 'open-uri'
require 'openssl'
req = URI.parse("https://gathercrm.com/internal/auth")
res = req.read(
:ssl_verify_mode => OpenSSL::SSL::VERIFY_NONE,
:http_basic_authentication => ["test", "pass"]
)
@jlindley
jlindley / config.ru
Created April 18, 2011 17:03
Rails 2.3.x config.ru (to allow using http://pow.cx/ )
require "./config/environment"
use Rails::Rack::LogTailer
use Rails::Rack::Static
run ActionController::Dispatcher.new
class PlayerHandle
class TurnExecutor
def initialize(handle)
end
end
class AttributeUpdater
def initialize(handle)
end
@jlindley
jlindley / right_assignments.yml
Created March 9, 2011 19:58
Right to add for dashboard
# under organization_user
dashboard:
- "use_dashboard"
module Bar
def self.anon_struct
s = Struct.new(:foo, :bar, :baz)
oid = s.object_id
s = nil
oid
end
end