Skip to content

Instantly share code, notes, and snippets.

View purbon's full-sized avatar

Pere Urbón purbon

View GitHub Profile
@purbon
purbon / vagrant_pop_error.txt
Created June 9, 2016 09:04
Vagrant snapshot pop issue
purbon@slave-342015:~/logstash/qa$ vagrant snapshot push ubuntu-1404
==> ubuntu-1404: Snapshotting the machine as 'push_1465462243_250'...
==> ubuntu-1404: Snapshot saved! You can restore the snapshot at any time by
==> ubuntu-1404: using `vagrant snapshot restore`. You can delete it using
==> ubuntu-1404: `vagrant snapshot delete`.
purbon@slave-342015:~/logstash/qa$ vagrant snapshot pop ubuntu-1404
==> ubuntu-1404: Forcing shutdown of VM...
==> ubuntu-1404: Restoring the snapshot 'push_1465462243_250'...
==> ubuntu-1404: Deleting the snapshot 'push_1465462243_250'...
==> ubuntu-1404: Snapshot deleted!
@purbon
purbon / yardoc_cheatsheet.md
Created June 2, 2016 15:59 — forked from chetan/yardoc_cheatsheet.md
YARD cheatsheet

YARD CHEATSHEET http://yardoc.org

cribbed from http://pastebin.com/xgzeAmBn

Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.

Modules

Namespace for classes and modules that handle serving documentation over HTTP

@purbon
purbon / output.bash
Created May 19, 2016 17:11
logstash error
vagrant@packer-virtualbox-iso-1452039329:~$ sudo dpkg -i /logstash-build/logstash-5.0.0.dev.deb
Selecting previously unselected package logstash.
(Reading database ... 107862 files and directories currently installed.)
Preparing to unpack .../logstash-5.0.0.dev.deb ...
Unpacking logstash (1:5.0.0~dev-1) ...
Setting up logstash (1:5.0.0~dev-1) ...
Processing triggers for ureadahead (0.100.0-16) ...
vagrant@packer-virtualbox-iso-1452039329:~$ sudo /opt/logstash/bin/logstash-plugin install ./logstash-filter-qatest-0.1.1.gem
Validating ./logstash-filter-qatest-0.1.1.gem
Installing logstash-filter-qatest
@purbon
purbon / gist:45c9e06f48da564ab6e483b898cb670f
Created May 19, 2016 07:35
LS PR artifact:deb error.bash
skywalker% git pr 5259
From github.com:elastic/logstash
* [new ref] refs/pull/5259/head -> pr/5259
skywalker% git checkout pr/5259
Switched to branch 'pr/5259'
skywalker% ls
CHANGELOG Gemfile Makefile Rakefile build dripmain.rb logstash-core-event patterns rakelib vendor
CHANGELOG.md Gemfile.jruby-1.9.lock NOTICE.TXT STYLE.md ci lib logstash-core-event-java pkg spec
CONTRIBUTORS LICENSE README.md bin docs logstash-core logstash-core-plugin-api qa tools
skywalker% git status
@purbon
purbon / gist:495be8d1dbe735ae9c7e95bcb6702c04
Created April 22, 2016 14:24
bundler issues with jruby-1.7.25 and logstash master
[vagrant@localhost logstash]$ DEBUG=1 rake bootstrap
Restarting myself under Vendored JRuby (currently jruby 1.9.3)
mkdir -p vendor
mkdir vendor/_
Downloading http://jruby.org.s3.amazonaws.com/downloads/1.7.25/jruby-bin-1.7.25.tar.gz
Installing minitar >= 0 because the build process needs it.
[bootstrap] Fetching and installing gem: minitar (>= 0)
Fetching: minitar-0.5.4.gem (100%)
Successfully installed minitar-0.5.4
@purbon
purbon / gist:a28f6baf2437bc83de89
Created November 18, 2015 17:27
errors seen while running test 2.1
nstallation successful
[plugin:install-development-dependencies] Installing development dependencies of all installed plugins
Installing logstash-devutils
Installation successful
skywalker% rake test:core
Using Accessor#strict_set for specs
Run options: exclude {:redis=>true, :socket=>true, :performance=>true, :couchdb=>true, :elasticsearch=>true, :elasticsearch_secure=>true, :export_cypher=>true, :integration=>true, :windows=>true}
....................FFFF......................................................................................................................................................................................F........................................................................FF..................................................................................................................................................................................................................................................................................................................
@purbon
purbon / example_spec.rb
Last active October 14, 2015 14:49
rspec test example.
describe "foo" do
subject { described_class.new(options) }
let(:var) { "zzzz"}
before(:each) do
# do something
end
context "when bar" do
@purbon
purbon / gist:3dbe78f9cb0c36d739a5
Created October 7, 2015 13:29
common apache log logstash config
input {
stdin { }
}
filter {
grok {
match => {
"message" => '%{IPORHOST:clientip} %{USER:ident} %{USER:auth} \[%{HTTPDATE:timestamp}\] "%{WORD:verb} %{DATA:request} HTTP/%{NUMBER:httpversion}" %{NUMBER:response:int} (?:-|%{NUMBER:bytes:int}) %{QS:referrer} %{QS:agent}'
}
}
@purbon
purbon / gist:a2716c5ade1815caa451
Created September 24, 2015 08:45
Barcelona running routes
This are several routes that could work as example for your running tours:
7km: http://www.wikiloc.com/wikiloc/view.do?id=10886127
12.5km: http://www.wikiloc.com/wikiloc/view.do?id=10394999
14.5km: http://www.wikiloc.com/wikiloc/view.do?id=10395148
as a rule of thumbs good points for city running are:
* La diagonal
* La barceloneta beach.
@purbon
purbon / gist:6415a7321e8a9a0cdc61
Created August 14, 2015 10:17
bin/bundle install --clean problem
purbon-elastic% bin/bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies.....
Installing rake 10.4.2
Using addressable 2.3.8
Using cabin 0.7.1
Using arr-pm 0.0.10
Using backports 3.6.4