This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'nokogiri' | |
require 'open-uri' | |
meu_lance = 100.00 | |
def get_current_price() | |
doc = Nokogiri::HTML(open("http://viniciusteles.com.br/moveis/puff-lilas")) | |
doc.xpath('//div[@id="bidding"]/h3/em').to_s =~ /.*R\$ (.*).*/ | |
$1.to_f | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* jQuery Tiny Pub/Sub - v0.X - 11/18/2010 | |
* http://benalman.com/ | |
* | |
* Original Copyright (c) 2010 "Cowboy" Ben Alman | |
* Dual licensed under the MIT and GPL licenses. | |
* http://benalman.com/about/license/ | |
* | |
* Made awesome by Rick Waldron | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; emacs configuration | |
(push "/usr/local/bin" exec-path) | |
(add-to-list 'load-path "~/.emacs.d") | |
(setq make-backup-files nil) | |
(setq auto-save-default nil) | |
(setq-default tab-width 2) | |
(setq-default indent-tabs-mode nil) | |
(setq inhibit-startup-message t) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Pow Port | |
# | |
# Quickly and easily change the port that Pow is running on. This allows | |
# you too run Apache and Pow side-by-side (on different ports of course). | |
# | |
# WARNING: This will OVERWRITE your ~/.powconfig file. If you have custom | |
# configurations in there, please back it up first. | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
#/ Usage: pow [on|off] | |
#/ Toggle between running Pow (http://pow.cx) and Apache on Mac OS X. | |
# Show Usage | |
function usage { | |
grep '^#/' "$0" | cut -c4- | |
exit 2 | |
} | |
[ -z "$1" -o "$1" = "--help" ] && usage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(window,undefined){ | |
// Load Helpers | |
var | |
intervalScript, intervalJquery, | |
loadScript = function(scriptUrl){ | |
var e = document.createElement('script'); | |
e.setAttribute('src',scriptUrl); | |
window.document.body.appendChild(e); | |
return e; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.context = window.describe | |
describe ".googlePandaStatus", -> | |
Given -> @ajaxCaptor = jasmine.captor() | |
Given -> spyOn($, "get") | |
When -> googlePandaStatus("Happy") | |
And -> expect($.get).toHaveBeenCalledWith("http://google.com", @ajaxCaptor.capture()) | |
describe "~ the AJAX success handler", -> | |
Given -> spyOn(window, "printMessage") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Moved to its own repo: http://github.com/fnando/rubygems_proxy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use feature, background, and scenario blocks to write acceptance tests in test/unit | |
# which are really just integration tests. include capybara or webrat or something and voila. | |
# test/acceptance_helper.rb | |
require 'test_helper' | |
module ActionDispatch | |
class AcceptanceTest < ActionDispatch::IntegrationTest | |
class << self | |
alias :background :setup |