Skip to content

Instantly share code, notes, and snippets.

Bruno Miranda brupm

View GitHub Profile

Keybase proof

I hereby claim:

  • I am brupm on github.
  • I am brupm ( on keybase.
  • I have a public key whose fingerprint is F94B EAE7 F3C5 95E0 A504 857E A5E8 5511 90D7 B0B5

To claim this, I am signing this object:

brupm /
Created Jun 29, 2016
Elasticsearch Sample Mappings, Indexing, Searching - Useful for debugging & troubleshooting
### Create the Index
curl -XDELETE http://localhost:9200/users
curl -XPOST localhost:9200/users -d '{
"mappings" : {
"user" : {
"properties" : {
"name" : {
"type" : "string",
"index" : "not_analyzed"
View elasticsearch.rb
class Elasticsearch < Formula
desc "Distributed real-time search & analytics engine for the cloud"
homepage ""
url ""
sha256 "0aa58947d66b487488e86059352deb7c6cab5da4accdff043cce9fed7c3d2fa7"
head do
url ""
depends_on "maven" => :build
View decoded.txt
brupm / cors-nginx.conf
Last active Aug 29, 2015 — forked from michiel/cors-nginx.conf
Wide-open CORS config for nginx
View cors-nginx.conf
# Wide-open CORS config for nginx
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
\"text\": \"HEAR the sledges with the bells, / Silver bells! / What a world of merriment their melody foretells! / How they tinkle, tinkle, tinkle, / In the icy air of night! / While the stars, that oversprinkle / All the heavens, seem to twinkle / With a crystalline delight; / Keeping time, time, time, / In a sort of Runic rhyme, / To the tintinnabulation that so musically wells / From the bells, bells, bells, bells, / Bells, bells, bells— / From the jingling and the tinkling of the bells.\"
if curl -fs -X HEAD localhost:9200/top-terms; then
echo "Clear the old test index"
curl -X DELETE localhost:9200/top-terms; echo "\n"
brupm / kill.rb
Created Nov 14, 2014
kill jobs in resque
View kill.rb
10_000.times do |n|
r.lrange(k, n * 1_000, (n + 1) * 1_000).each do |e|
next unless e =~ /JobToKill/
r.lrem(k, 1, e)
You can’t perform that action at this time.