Skip to content

Instantly share code, notes, and snippets.

Avatar

Jim Lindley jlindley

View GitHub Profile
View keybase.md

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:

View keybase.md

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 Jul 31, 2012
nginx-1.0.15-r2 Failure
View emerge-failure.txt
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 Jan 18, 2012
Bundle check then bundle install if needed, then bundle exec.
View b.bash
#!/usr/bin/env bash
(bundle check || bundle --local) && bundle exec "$@"
@jlindley
jlindley / descriptive_sql_load_log.rb
Created Jul 19, 2011 — forked from JackDanger/descriptive_sql_load_log.rb
Let Rails display file names and line numbers for log activity.
View descriptive_sql_load_log.rb
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"
View fetch_file.rb
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 Apr 18, 2011
Rails 2.3.x config.ru (to allow using http://pow.cx/ )
View config.ru
require "./config/environment"
use Rails::Rack::LogTailer
use Rails::Rack::Static
run ActionController::Dispatcher.new
View gist:862886
class PlayerHandle
class TurnExecutor
def initialize(handle)
end
end
class AttributeUpdater
def initialize(handle)
end
@jlindley
jlindley / right_assignments.yml
Created Mar 9, 2011
Right to add for dashboard
View right_assignments.yml
# under organization_user
dashboard:
- "use_dashboard"
View anon_struct.rb
module Bar
def self.anon_struct
s = Struct.new(:foo, :bar, :baz)
oid = s.object_id
s = nil
oid
end
end