Skip to content

Instantly share code, notes, and snippets.

Jeff Tucker trydionel

Block or report user

Report or block trydionel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am trydionel on github.
  • I am trydionel (https://keybase.io/trydionel) on keybase.
  • I have a public key ASAqp_aOZqcmAe0F12Mvs7kjsW8ly1MaSbxkQY6XnRIFWgo

To claim this, I am signing this object:

@trydionel
trydionel / email.txt
Created Jun 27, 2012
JustHost insanity
View email.txt
Jeff Tucker
9:04 AM (1 hour ago)
to support, billing
You do realize I'm no longer a customer of yours, right? You've freaked me out with these
emails 4-5 times over the last month -- 2 new billing emails (with a zero balance,
thankfully) and a few warnings that my non-existant server is being moved. This is
terrible -- you're going out of your way to ensure I'll never be a customer again. Please
stop contacting me.
@trydionel
trydionel / asset_check.rb
Created Mar 14, 2012
Finds and prints unused assets
View asset_check.rb
#!/usr/bin/env ruby
paths = ARGV
paths.each do |path|
Dir["#{path}/*"].each do |file|
asset = File.basename(file)
search = `ack -ai1 --ignore-dir=tmp --ignore-dir=log #{asset}`.strip
if search.length.zero?
ext = File.extname(asset)
View gist:1959381
// Rails-style JSON serialization. e.g., Given a form:
//
// <input type="text" name="foo[bar][]" value="qux" />
// <input type="text" name="foo[bar][]" value="quux" />
//
// $("form").serializeJSON() will serialize to
//
// { foo: { bar: [ "qux", "quux" ] } }
//
$.fn.serializeJSON = function() {
View gist:818773
ruby-1.8.7-p302 :001 > require 'builder'
=> true
ruby-1.8.7-p302 :002 > xm = Builder::XmlMarkup.new; nil
=> nil
ruby-1.8.7-p302 :003 > xm.title('foo'); nil
=> nil
ruby-1.8.7-p302 :004 > puts xm.target!
<title>foo</title>
=> nil
@trydionel
trydionel / backbone.rails.js
Created Nov 28, 2010
Makes Backbone.js play nicely with default Rails setup
View backbone.rails.js
//
// Backbone.Rails.js
//
// Makes Backbone.js play nicely with the default Rails setup, i.e.,
// no need to set
// ActiveRecord::Base.include_root_in_json = false
// and build all of your models directly from `params` rather than
// `params[:model]`.
//
// Load this file after backbone.js and before your application JS.
View super_return_test.rb
class SuperClass
def run
return "foo"
end
end
class SubClass < SuperClass
def run
super
return "bar"
@trydionel
trydionel / app.rb
Created Feb 27, 2010
Lightning-Quick Redis Viewer
View app.rb
require 'rubygems'
require 'haml'
require 'sinatra'
require 'redis'
helpers do
def redis
@redis ||= Redis.new
end
end
You can’t perform that action at this time.