Tim’s Blog
-
Pagination
The paginate function was removed from core rails in 2.0. No problem since my server ran an earlier version of rails. Until Bluehost updated rails without telling me. Easy enough to fix. In your project type: script/plugin install svn://errtheblog.com/svn/plugins/classic_pagination Then tar up your vendor folder and move it to the server, or use a better […]
-
Getting Rails Up on OS X
If you’re having problems with the standard OS X install of ruby, check out http://hivelogic.com/articles/ruby-rails-mongrel-mysql-osx/.
-
SVN Repository fix
I was fixing several subversion repositories. I didn’t have the standard branches, tags, trunk structure set up. Here’s a script to help with that. Use it like… sh ~/.svn-fix.sh https://mysvnserver.net/svn/hello-project trunk #!/bin/bash $repo=”$1″ $dest=”$2″ entries=`svn list $repo | grep -v $dest` svn mkdir $repo/$dest for d in $entries do svn move $repo/$d $repo/$dest/ -m “moved […]
-
The Owls Are Not What They Seem
So I recently had gone back and watched the entire series of Twin Peaks. It’s only 2 seasons, so it doesn’t take that long. Really good, I highly recommend it. It was interesting to find out that David Lynch also made Dune and reused large parts of the cast for Twin Peaks. So far I’ve […]
-
Debugging Method For Rubyclass Object
class Object def additional_methods if self.instance_of?(Class) self.methods.sort – Class.methods else self.methods.sort – Object.methods end end end #example usage class Foo def self.a end def Foo.b end def c end def d end end {:class=>Foo,:instance=>Foo.new}.each do |name,obj| puts “#{name} additional methods: #{obj.additional_methods.join(‘,’)}” end
Got any book recommendations?