Skip to content

Instantly share code, notes, and snippets.

View pierrevalade's full-sized avatar

Pierre pierrevalade

View GitHub Profile
check process sphinx_<app_name>_3312
with pidfile /var/run/sphinx/<app_name>.pid
start program = "/engineyard/bin/thinking_sphinx_searchd <app_name> start" as uid <user_name> and gid <user_group>
stop program = "/engineyard/bin/thinking_sphinx_searchd <app_name> stop" as uid <user_name> and gid <user_group>
group sphinx_<app_name>
# Sphinx and ThinkingSphinx
after "deploy:migrate", "thinking_sphinx:home_made"
namespace :thinking_sphinx do
task :home_made do
# ensure the log directory exist
run "mkdir -p /var/log/engineyard/sphinx/#{application}"
steps = [:configure, :reindex]
run steps.map {|step| "/engineyard/bin/thinking_sphinx_searchd #{application} #{step}"}.join(' && ')
@pierrevalade
pierrevalade / gist:122297
Created June 2, 2009 15:26 — forked from 7hunderbird/gist:91641
put this in /etc/monit.d/sphinx.tiiptop.monitrc
check process sphinx_tiiptop_3312
with pidfile /var/run/sphinx/tiiptop.pid
start program = "/engineyard/bin/thinking_sphinx_searchd tiiptop start" as uid deploy and gid deploy
stop program = "/engineyard/bin/thinking_sphinx_searchd tiiptop stop" as uid deploy and gid deploy
group sphinx_tiiptop
module Paperclip
class ThumbnailWithDimensions < Thumbnail
def initialize(file, options = {}, attachment = nil)
super
attachment.instance_write(:width, @current_geometry.width)
attachment.instance_write(:height,@current_geometry.height)
end
end
end