Skip to content

Instantly share code, notes, and snippets.

View lpradovera's full-sized avatar

Luca Pradovera lpradovera

View GitHub Profile
luca@luca-acer:~/Downloads$ sudo dpkg -i nautilus-dropbox_0.6.9_amd64.deb
Selecting previously deselected package nautilus-dropbox.
(Reading database ... 140671 files and directories currently installed.)
Unpacking nautilus-dropbox (from nautilus-dropbox_0.6.9_amd64.deb) ...
dpkg: dependency problems prevent configuration of nautilus-dropbox:
nautilus-dropbox depends on libnautilus-extension1 (>= 1:2.22.2); however:
Version of libnautilus-extension1 on system is 2.30.1-2squeeze1.
dpkg: error processing nautilus-dropbox (--install):
dependency problems - leaving unconfigured
Processing triggers for desktop-file-utils ...
prado@SoftSpider:~$ curl -XDELETE http://localhost:9200/twitter
{"ok":true,"acknowledged":true}prado@SoftSpider:~$ curl -XPUT http://localhost:9200/twitter
{"ok":true,"acknowledged":true}prado@SoftSpider:~$ curl -XPUT http://localhost:9200/twitter/tweet/2 -d '{
> "user": "kimchy",
> "post_date": "2009-11-15T14:12:12",
> "message": "You know, for Search"
> }'
{"ok":true,"_index":"twitter","_type":"tweet","_id":"2","_version":1}prado@SoftSpider:~$ curl -XPOST http://localhost:9200/twitter/_refresh
{"ok":true,"_shards":{"total":10,"successful":5,"failed":0}}prado@SoftSpider:~$
prado@SoftSpider:~$ curl -XGET "http://localhost:9200/twitter/_search?pretty=true&q=*"
def self.exec_sql(sql)
18 sql = ActiveRecord::Base.connection();
19 sql.execute "SET autocommit=0";
20 sql.begin_db_transaction
21 sql.execute(sql)
22 sql.commit_db_transaction
23 end#exec
{
"filtered" : {
"query" : {
"bool" : {
"should" : [
{
"text" : {
"title" : "Programmatore",
"boost" : 2
}
class Language < ActiveRecord::Base
set_table_name 'tab_lingue'
set_primary_key 'id'
has_and_belongs_to_many :persons, {
:join_table => "persone_x_tab_lingue",
:foreign_key => "tab_lingue_id",
:association_foreign_key => "persone_id"
}
end
ahn start .
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:318:in `retrieve_connection': ActiveRecord::ConnectionNotEstablished (ActiveRecord::ConnectionNotEstablished)
from /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:97:in `retrieve_connection'
from /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:89:in `connection'
from /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/associations.rb:1804:in `create_has_and_belongs_to_many_reflection'
from /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/associations.rb:1411:in `has_and_belongs_to_many'
from /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/autosave_association.rb:137:in `has_and_belongs_to_many'
from /opt/ahn/emed/models/language.rb:4
from /h