Skip to content

Instantly share code, notes, and snippets.

View justinvt's full-sized avatar

justin thibault justinvt

View GitHub Profile
#!/usr/bin/ruby
def go_to
system "cd $nook"
end
def edit
go_to
system "cd ..;mate nooknack"
end
def index
if params[:search_agent] && !params[:search_agent][:keywords].empty?
#create a dummy search agent
@search_agent = SearchAgent.new(params[:search_agent])
@search_agent.get #geocode manually
@search = @search_agent.search(:page=>params[:page])
@search.run
@searched_latlon = [@search_agent.placemark.x,@search_agent.placemark.y] unless @search_agent.placemark.nil?
@jobs = @search.results
@save_job_params = {:search_agent => {:keywords => params[:search_agent][:keywords], :location => params[:search_agent][:location]}}
def index
if params[:search_agent] && !params[:search_agent][:keywords].empty?
#create a dummy search agent
@search_agent = SearchAgent.new(params[:search_agent])
@search_agent.get #geocode manually
@search = @search_agent.search(:page=>params[:page])
@search.run
@searched_latlon = [@search_agent.placemark.x,@search_agent.placemark.y] unless @search_agent.placemark.nil?
@jobs = @search.results
@save_job_params = {:search_agent => {:keywords => params[:search_agent][:keywords], :location => params[:search_agent][:location]}}
if($.isFunction($.fn.becomesOverlay)){
$(".job_seeker_share").each(function(i,n){
$(n).becomesOverlay(function(){do_something_with_tabs()});
})
}
tweety_jobs_development.job_sources' doesn't exist: SELECT 'Job' AS polymorphic_parent_class, 'sources' AS polymorphic_association_id, channels.created_at AS t0_r4, channels.description AS t0_r2, channels.frequency AS t0_r6, channels.id AS t0_r0, channels.max_id AS t0_r7, channels.name AS t0_r1, channels.read_at AS t0_r3, channels.updated_at AS t0_r5, feeds.created_at AS t1_r6, feeds.fields AS t1_r2, feeds.id AS t1_r0, feeds.method AS t1_r3, feeds.name AS t1_r4, feeds.read_at AS t1_r5, feeds.updated_at AS t1_r7, feeds.url AS t1_r1, hash_tags.average_frequency AS t2_r5, hash_tags.created_at AS t2_r6, hash_tags.description AS t2_r2, hash_tags.id AS t2_r0, hash_tags.name AS t2_r1, hash_tags.next_read AS t2_r4, hash_tags.read_at AS t2_r3, hash_tags.updated_at AS t2_r7, users.access_secret AS t4_r52, users.access_token AS t4_r51, users.activated_at AS t4_r59, users.activation_code AS t4_r57, users.address_1 AS t4_r42, users.address_2 AS t4_r43, users.avatar_content_type AS t4_r34, users.avatar_file_name AS t4_r33,
# Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.
class ApplicationController < ActionController::Base
include AuthenticatedSystem
helper :all # include all helpers, all the time
task :repair_image_magick, :roles=>[:app] do
sudo "aptitude update "
sudo "aptitude install imagemagick"
sudo "apt-get install librmagick-ruby --yes"
sudo "apt-get install libmagick9-dev --yes"
sudo "gem install rmagick"
end
task :bundle, :roles=>[:app, :web] do
sudo "rake ec2:locate_sendmail RAILS_ENV=#{rails_env}"
require 'config/deploy/ferret.rb'
set :application, "nooknack"
set :rails_env, "ec2"
set :repository, "[email protected]:justinvt/nooknack.git"
set :branch, "master"
role :web, "ec2-12-xx-xx-xx.z-1.compute-1.amazonaws.com"
require 'config/deploy/ferret.rb'
set :application, "nooknack"
set :rails_env, "ec2"
set :repository, "[email protected]:justinvt/nooknack.git"
set :branch, "master"
role :web, "ec2-12-xx-xx-xx.z-1.compute-1.amazonaws.com"
task :production do
role :web, "70.42.333.411:8043" # tweetyjobs [mongrel] [mysql50-5-master]
role :app, "70.42.333.411:8043", :mongrel => true
role :db , "70.42.333.411:8043", :primary => true
role :app, "70.42.333.411:8044", :no_release => true, :mongrel => true
set :rails_env, "production"
set :environment_database, defer { production_database }
set :environment_dbhost, defer { production_dbhost }
end