Skip to content

Instantly share code, notes, and snippets.

View av-ast's full-sized avatar

Alexey Astafyev av-ast

View GitHub Profile
" Ignore some folders and files for CtrlP indexing
let g:ctrlp_custom_ignore = {
\ 'dir': '\.git$\|\.sass-cache$|\.hg$\|\.svn$\|\.yardoc\|public$|log\|tmp$',
\ 'file': '\.so$\|\.dat$|\.DS_Store$'
\ }
@av-ast
av-ast / gist:4156678
Created November 27, 2012 20:05
ES FilteredQuery
$ curl -X GET "http://localhost:9200/videos/_search?from=0&load=true&size=10&pretty=true" -d '
{
"query" :
{
"filtered" :
{
"query":
{
"match_all":{}
},
@av-ast
av-ast / polish_calc.rb
Created July 18, 2012 22:05
Calculator and converter for Reverse Polish Notation
module PolishCalc
OPERATORS = {
"+" => {:priority => 0, :arity => 2},
"-" => {:priority => 0, :arity => 2},
"*" => {:priority => 1, :arity => 2},
"/" => {:priority => 1, :arity => 2}
}
class Stack