This file contains 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
var myServices = angular.module('myServices', ['elasticsearch']); | |
myServices.service('es', ['esFactory', | |
function (esFactory, $http) { | |
return esFactory({ | |
host: 'localhost:9200', | |
}); | |
}]); | |
myServices.factory('searchService', ['es', function(es) { |
This file contains 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
<%= form_for [@commentable, @comment] do |f| %> | |
<div class="span12"> | |
<%= f.text_area :content, rows: 5, columns: 40 , placeholder: "Write a comment..." %> | |
</div> | |
<% end %> |
This file contains 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
=> Booting Thin | |
=> Rails 3.2.13 application starting in development on http://0.0.0.0:3000 | |
=> Call with -d to detach | |
=> Ctrl-C to shutdown server | |
>> Thin web server (v1.5.1 codename Straight Razor) | |
>> Maximum connections set to 1024 | |
>> Listening on 0.0.0.0:3000, CTRL+C to stop |
This file contains 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
vagrant@precise32:/vagrant$ bundle exec rails s | |
=> Booting Thin | |
=> Rails 3.2.13 application starting in development on http://0.0.0.0:3000 | |
=> Call with -d to detach | |
=> Ctrl-C to shutdown server | |
Exiting | |
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1216:in `initialize': could not connect to server: Connection refused (PGError) | |
Is the server running on host "localhost" (127.0.0.1) and accepting | |
TCP/IP connections on port 5432? |
This file contains 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
# Returns a Tweet | |
# | |
# @see https://dev.twitter.com/docs/api/1.1/get/statuses/show/:id | |
# @rate_limited Yes | |
# @authentication_required Requires user context | |
# @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. | |
# @return [Twitter::Tweet] The requested Tweet. | |
# @param id [Integer] A Tweet ID. | |
# @param options [Hash] A customizable set of options. | |
# @option options [Boolean, String, Integer] :trim_user Each tweet returned in a timeline will include a user object with only the author's numerical ID when set to true, 't' or 1. |
This file contains 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
Grackle::TwitterError: Unable to decode response: 757: unexpected token at '<?xml version="1.0" encoding="UTF-8"?> | |
<hash> | |
<request>/1/statueses/user_timeline.json?screen_name=my_event_organizer</request> | |
<error>Timestamp out of bounds</error> | |
</hash> | |
' | |
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/grackle-0.2.1/lib/grackle/client.rb:274:in `rescue in process_response' | |
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/grackle-0.2.1/lib/grackle/client.rb:265:in `process_response' | |
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/grackle-0.2.1/lib/grackle/client.rb:241:in `call_with_format' | |
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/grackle-0.2.1/lib/grackle/client.rb:221:in `append' |
This file contains 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
text = "bIg mouse" | |
redacted = "big" | |
words = text.split(" ") | |
words.each do |word| | |
if word != redacted | |
print word + " " | |
else |
This file contains 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
text = "bIg mouse" | |
redacted = "big" | |
words = text.split(" ") | |
words.each do |word| | |
if word != redacted | |
print word + " " |
This file contains 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
<% @blogs.each do |blog| %> | |
<div class="index_image"> | |
<%= link_to image_tag("blog.image.thumb.to_s"), blog %> | |
</div> | |
<%end%> |
This file contains 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
<li> <%= link_to "About Us", about_path, class: "#{cp(about_path)} link" %></li> |
NewerOlder