In your Gemfile:
gem 'bootstrap-components-helpers', :git => 'git://gist.github.com/2117187.git'
In your views:
= accordion do |accordion|
= accordion.pane 'My first pane' do
# https://gist.github.com/1305042 | |
module WillPaginate | |
module ActionView | |
def will_paginate(collection = nil, options = {}) | |
options[:renderer] ||= BootstrapLinkRenderer | |
super.try :html_safe | |
end | |
class BootstrapLinkRenderer < LinkRenderer |
Several times in a month there pop up questions regarding query structure on the ElasticSearch user group. | |
Although there are good docs explaining this in depth probably the bird view of the Query DSL is necessary to | |
understand what is written there. There is even already some good external documentation available: | |
http://www.elasticsearch.org/tutorials/2011/08/28/query-dsl-explained.html | |
And there were attempts to define a schema: | |
http://groups.google.com/group/json-schema/browse_thread/thread/ae498ee818155d50 | |
https://gist.github.com/8887766ca0e7052814b0 |
#!/bin/bash | |
# This script may be used to backup files having a specific extension | |
source="/path/to/source/dir" | |
dest="/path/to/rep/backup" | |
day=$(date +%d-%m-%Y) | |
# backup img files |
In your Gemfile:
gem 'bootstrap-components-helpers', :git => 'git://gist.github.com/2117187.git'
In your views:
= accordion do |accordion|
= accordion.pane 'My first pane' do
{ | |
"from" : 0, | |
"query" : { | |
"filtered" : { "query" : { "query_string" : { "query" : "jboss server" } }, | |
"filter": { | |
"and" : [ | |
{"range" : { "date" : {"from":"2007-07-25","to":"2010-12-16"}}}, | |
{"terms" : { "_index" : ["weld"]}}, | |
{"terms" : {"mail_list" : ["dev"]}}, | |
{"terms" : {"from.not_analyzed" : [ "Galder Zamarreno <[email protected]>","Pete Muir <[email protected]>"]}} |
{ | |
"from" : 0, | |
"query" : { | |
"filtered" : { "query" : { "query_string" : { "query" : "jboss server" } }, | |
"filter": { | |
"and" : [ | |
{"range" : { "date" : {"from":"2007-07-25","to":"2010-12-16"}}}, | |
{"terms" : { "_index" : ["weld"]}}, | |
{"terms" : {"mail_list" : ["dev"]}}, | |
{"terms" : {"from.not_analyzed" : [ "Galder Zamarreno <[email protected]>","Pete Muir <[email protected]>"]}} |
Accessing Helper modules in rails | |
http://www.funonrails.com/2010/12/accessing-helper-modules-in-rails.html | |
1. Helper methods all the time for views | |
class ApplicationController < ActionController::Base | |
helper :all# include all helpers, all the time for views | |
end |
{ | |
"from" : 0, | |
"size" : 10, | |
"query" : { | |
"match_all" : { | |
} | |
}, | |
"explain" : false, | |
"facets" : { | |
"f1" : { |
######################################################################################################### | |
# I18n French translation for Devise (http://github.com/plataformatec/devise) | |
# I18n traduction française pour Devise | |
######################################################################################################### | |
fr: | |
errors: | |
messages: | |
not_found: "n'a pas été trouvé(e)" | |
already_confirmed: "a déjà été confirmé(e)" |
curl -XDELETE 'localhost:9200/test' | |
# grasp available rules with: jar tvf plugins/analysis-phonetic/commons-codec-*.jar | grep bm | |
curl -XPUT 'localhost:9200/test' -d ' | |
{ | |
"settings" : { | |
"index" : { | |
"analysis" : { |