Skip to content

Instantly share code, notes, and snippets.

View mcmajkel-gist's full-sized avatar

mcmajkel-gist

View GitHub Profile
@mcmajkel-gist
mcmajkel-gist / paliwa.rb
Created August 10, 2012 16:55
stacje_wawa_pb95
require 'rubygems'
require 'nokogiri'
require 'open-uri'
url = "http://www.cenapaliw.pl/index.php?o=&m=95&l=7&k=327"
doc = Nokogiri::HTML(open(url))
ceny = []
doc.css("#priser tr").each do |item|
nazwa = item.at_css(':first-child').text
price = item.text[/\d+,\d\d/]
/* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011
* http://benalman.com/
* Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */
(function($) {
var o = $({});
$.subscribe = function() {
o.on.apply(o, arguments);
@mcmajkel-gist
mcmajkel-gist / gist:1989549
Created March 6, 2012 22:49 — forked from padolsey/gist:527683
html: detectIe
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}