Skip to content

Instantly share code, notes, and snippets.

Avatar

sarah

View GitHub Profile
View gist:5225220
rackup
/Users/sarah/.rvm/gems/jruby-1.7.1@inventorium-api2/gems/json-1.7.6-java/lib/json/version.rb:4 warning: already initialized constant VERSION
/Users/sarah/.rvm/gems/jruby-1.7.1@inventorium-api2/gems/json-1.7.6-java/lib/json/version.rb:5 warning: already initialized constant VERSION_ARRAY
/Users/sarah/.rvm/gems/jruby-1.7.1@inventorium-api2/gems/json-1.7.6-java/lib/json/version.rb:6 warning: already initialized constant VERSION_MAJOR
/Users/sarah/.rvm/gems/jruby-1.7.1@inventorium-api2/gems/json-1.7.6-java/lib/json/version.rb:7 warning: already initialized constant VERSION_MINOR
/Users/sarah/.rvm/gems/jruby-1.7.1@inventorium-api2/gems/json-1.7.6-java/lib/json/version.rb:8 warning: already initialized constant VERSION_BUILD
/Users/sarah/.rvm/gems/jruby-1.7.1@inventorium-api2/gems/json-1.7.6-java/lib/json/common.rb:100 warning: already initialized constant NaN
/Users/sarah/.rvm/gems/jruby-1.7.1@inventorium-api2/gems/json-1.7.6-java/lib/json/common.rb:102 warning: already initialized constant Infinity
/Users/
@sarah
sarah / AppDelegate.m
Created Nov 17, 2011
Syncing with a filter
View AppDelegate.m
************
AppDelegate.m
************
-(void) performRemoteSync
{
NSURL *remoteURL = [NSURL URLWithString:kRemoteSyncURL];
NSLog(@"Going to perform remote sync with: %@", remoteURL);
self.pullRequest = [self.localCouch replicationFromDatabaseAtURL:remoteURL];
[pullRequest setContinuous: YES];
View gist:209176
Here are the define index blocks for
Asset:
define_index do
indexes filename, content_type, description, attachment_type
has attachment_id
set_property :delta => true
end
sphinx_scope(:by_element){|element_id|
View gist:207755
# Confirm my current directory is pointing to the most recent release
________________________________________________________________
$ls-l
lrwxrwxrwx 1 canvasband canvasband 75 Oct 10 17:27 current -> /home/canvasband/public_html/staging.canvasband.com/releases/20091010172708
# Confirm sphinx is running. To be honest, I'm not sure if this is running as the correct user. I tried running as root, but that gave me permission errors when trying to query.
________________________________________________________________
$ ps aux | grep search
1001 27478 0.0 0.2 28112 1208 pts/0 S 16:52 0:00 /usr/local/bin/searchd --pidfile --config /home/canvasband/public_html/staging.canvasband.com/releases/20091010172708/config/production.sphinx.conf
1001 27490 0.0 0.1 3936 600 pts/0 S+ 16:56 0:00 grep search
You can’t perform that action at this time.