This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@alquds:/home/en# RAILS_ENV=production rails s | |
=> Booting WEBrick | |
=> Rails 3.2.12 application starting in production on http://0.0.0.0:3000 | |
=> Call with -d to detach | |
=> Ctrl-C to shutdown server | |
Exiting | |
/usr/local/lib/ruby/1.9.1/psych.rb:203:in `parse': (<unknown>): mapping values are not allowed in this context at line 18 column 7 (Psych::SyntaxError) | |
from /usr/local/lib/ruby/1.9.1/psych.rb:203:in `parse_stream' | |
from /usr/local/lib/ruby/1.9.1/psych.rb:151:in `parse' | |
from /usr/local/lib/ruby/1.9.1/psych.rb:127:in `load' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
development: | |
adapter: sqlite3 | |
database: db/development.sqlite3 | |
pool: 5 | |
timeout: 5000 | |
# Warning: The database defined as "test" will be erased and | |
# re-generated from your development database when you run "rake". | |
# Do not set this db to the same as development or production. | |
test: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Question.find_by_sql("SELECT t1.* FROM questions t1 LEFT JOIN questions_options t2 ON t1.id = t2.question_id WHERE t2.question_id IS NULL AND t2.user_id != 1") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def up package | |
aws_connect | |
@href = package.items.where(:kind=>'video').first.urls.first.href | |
url = "#{@href}?token=#{@token}" | |
AWS::S3::S3Object.store('new_file_name.mp4', open(url), 'jamal_bucket', access: :public_read) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The kingdom of <prince surname here> | |
announces the royal wedding of | |
the Princess Cinderella | |
daughter of King <bride's father's first name> and Queen <bride's mother's first name> | |
to the Prince Charming | |
of the kingdom of <groom's surname> | |
son of King <groom's father's first name> and Queen <groom's mother's first name> | |
at the Royal Palace | |
King Road | |
Chelsea |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
in the view | |
===================== | |
<%= link_to_remote 'click', :update => "share", | |
:url => { :controller=>'blogs', :action=>'share' }, | |
:complete => visual_effect(:highlight, 'share') | |
%> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def share | |
link_to_function "Details" do |page| | |
return %( | |
<script type="text/javascript"> | |
RPXNOW.loadAndRun(['Social'], function () { | |
var activity = new RPXNOW.Social.Activity( | |
"Share your comment", | |
"commented on 'Like My New Perfume?' on cuteoverload.com", | |
"http://cuteoverload.com/2009/10/26/like-my-new-perfume/"); | |
RPXNOW.Social.publishActivity(activity); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def make_front | |
object = params[:model].constantize.find(params[:id]) | |
if current_user.admin? | |
if object.front_page == true || object.front_page == false | |
front_page = (object.front_page? ? false : true) | |
object.update_attribute('front_page', front_page) | |
render :partial => "make_front", :locals => { :object => object, :message => nil } | |
else | |
render :partial => "make_front", :locals => { :message => 'can not be set to front-page' } | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Settings specified here will take precedence over those in config/environment.rb | |
# In the development environment your application's code is reloaded on | |
# every request. This slows down response time but is perfect for development | |
# since you don't have to restart the webserver when you make code changes. | |
config.cache_classes = false | |
# Log error messages when you accidentally call methods on nil. | |
config.whiny_nils = true |
NewerOlder