Public Gists by freelancing-god

Gravatar
Wed Nov 18 05:08:19 -0800 2009
1
2
3
# Since rubygems should have been required already, we can determine from the
# Gem object what is and isn't available.
if Gem.available?('thinking-sphinx')
gist: 225733 Information on Delta Change...
Gravatar
Tue Nov 03 18:54:14 -0800 2009
1
2
3
If you're using Thinking Sphinx with either Datetime or Delayed Deltas, there's
been some notable changes in the latest release (1.3.0).
 
Gravatar
Sat Oct 24 22:09:55 -0700 2009
1
2
3
# Install gems locally, and only locally, without gem complaining
# about path access, and ensuring access to executables.
#
Gravatar
Sat Oct 03 04:57:06 -0700 2009
1
2
3
<!--
# sphinx_attributes feature in Thinking Sphinx
# useful for accessing calculated/association-based attributes directly, instead
Gravatar
Sun Sep 27 02:03:22 -0700 2009
1
2
3
# nginx configure arguments for my slice. Recompile necessary to add HTTP
# and Passenger together.
./configure \
Gravatar
Thu Sep 17 06:40:14 -0700 2009
1
2
3
# Cruise Server
expected "foo({\"block_id\":\"app-32\",\"title\":\"Book 1\",\"cover\":\"\\/covers\\/thumb\\/missing.png\",\"id\":407})"
to match /"cover":"\/covers\/thumb\/missing.png"/
Gravatar
Sat Sep 05 03:15:05 -0700 2009
1
2
3
[mysqld]
init_connect='SET collation_connection = utf8_general_ci'
init_connect='SET NAMES utf8'
Gravatar
Fri Sep 04 10:35:34 -0700 2009
1
2
3
module ThinkingSphinx
  class Search
    # rough implementation of what the code actually does.
Gravatar
Mon Aug 31 08:52:22 -0700 2009
1
2
3
# Easier helpers-with-blocks testing in rspec. Although, granted, won't be the
# right approach in many circumstances (ie: when you've got erb/html within the
# block, eval_erb is probably better).
Gravatar
Wed Aug 26 11:05:27 -0700 2009
1
2
3
Outstanding TS Tasks, in no particular order:
- DataMapper Support
- Oracle Support
Gravatar
Tue Jul 28 16:09:15 -0700 2009
1
2
3
Kiva - microlending to small businesses in developing nations
http://www.kiva.org/
 
Gravatar
Sat Jul 25 08:31:15 -0700 2009
1
2
3
# Excerpts Example:
# Automatically available in search results
 
Gravatar
Thu Jul 02 19:39:52 -0700 2009
1
2
3
Possible Sponsored-Thinking Sphinx Features
* Named Scope equivalent (Sphinx Scope?)
* Multiple Index definition within STI subclasses.
Gravatar
Thu Jul 02 17:55:32 -0700 2009
1
2
3
   # Examples:
    # Post.by_day
    # Post.by_day(Time.yesterday)
gist: 130373 Returning HTML in AJAX call...
Gravatar
Mon Jun 15 14:51:25 -0700 2009
1
2
3
# Three things to add:
# * before_filter call
# * action_has_layout? method (if you have one, combine them)
Gravatar
Fri Jun 12 13:19:57 -0700 2009
1
2
input = q.at('input')
input = q.add_child(Nokogiri::XML::Node.new('input', doc)) if input.nil?
Gravatar
Fri Jun 05 11:40:56 -0700 2009
1
2
3
1) Add the function below into your .bash_profile, .bash_login, or other shell profile file.
2) Then you can hit nt (for new tab) anywhere
   and a new tab will open up in same directory.
Gravatar
Mon May 18 11:58:00 -0700 2009
1
2
3
Summary of Michael Pollan's talk at The Long Now Foundation, by Kevin Kelly.
http://blog.longnow.org/2009/05/06/long-now-media-update-30/
 
Gravatar
Sun Apr 26 01:03:37 -0700 2009
1
2
3
def drill(*args)
  args.inject(nil) do |obj, pointer|
    obj = obj.nil? ? pointer : obj[pointer]
Gravatar
Fri Apr 24 22:54:09 -0700 2009
1
2
3
class A
  def initialize
    dispatch if respond_to?(:dispatch)