Skip to content

Instantly share code, notes, and snippets.

View JonathanTron's full-sized avatar

Jonathan Tron JonathanTron

View GitHub Profile
# require Rubygems and Nokogiri
require "rubygems"
# => true
require "nokogiri"
# => true
# Let's try to get all the first TRs from the TBODYs (skipping the first one) in a TABLE
Nokogiri::CSS.parse("table tbody:nth-child(n+2) tr:nth-child(1)").first.to_xpath
# => "//table//tbody[(position() >= 2) and (((position()-2) mod 1) = 0)]//*[position() = 1 and self::tr]"
# go to your repository
cd my_project
# check your existing remote
git remote -v
# origin [email protected]:my_project.git (fetch)
# origin [email protected]:my_project.git (push)
# Add a new remote, a github.com private repository for example
# the --mirror flag is what's different from a simple new remote
@JonathanTron
JonathanTron / geoip.conf
Created September 5, 2013 12:05
Logstash 1.2.0 geoip debug
input { stdin { } }
filter {
json {
source => "message"
}
geoip {
source => '[usracct][device]'
add_field => [ "lonlat", "[%{[geoip][longitude]},%{[geoip][latitude]}]" ]
target => "geoip"
}

Keybase proof

I hereby claim:

  • I am jonathantron on github.
  • I am jonathantron (https://keybase.io/jonathantron) on keybase.
  • I have a public key ASANJAp3SdOHa0DxY398nccrFVKPJMb1gwL20mksS-fPLQo

To claim this, I am signing this object: