Skip to content

Instantly share code, notes, and snippets.

View juarezpaf's full-sized avatar

Juarez Filho juarezpaf

View GitHub Profile
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
@timblair
timblair / caveatPatchor.js
Created February 15, 2011 10:27 — forked from protocool/caveatPatchor.js
Sample caveatPatchor.js file for use in Propane 1.1.2 and above: pulls avatars from Gravatar
/*
As of version 1.1.2, Propane will load and execute the contents of
~Library/Application Support/Propane/unsupported/caveatPatchor.js
immediately following the execution of its own enhancer.js file.
You can use this mechanism to add your own customizations to Campfire
in Propane.
Below you'll find two customization examples.
@db
db / jquery.ajax.progress.js
Created May 11, 2011 12:43
add XHR2 progress events to jQuery.ajax
(function addXhrProgressEvent($) {
var originalXhr = $.ajaxSettings.xhr;
$.ajaxSetup({
progress: function() { console.log("standard progress callback"); },
xhr: function() {
var req = originalXhr(), that = this;
if (req) {
if (typeof req.addEventListener == "function") {
req.addEventListener("progress", function(evt) {
that.progress(evt);
@artero
artero / launch_sublime_from_terminal.markdown
Last active January 25, 2024 16:57 — forked from olivierlacan/launch_sublime_from_terminal.markdown
Launch Sublime Text 2 from the Mac OS X Terminal

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation

@ziadoz
ziadoz / awesome-php.md
Last active April 17, 2024 21:06
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
@roboshoes
roboshoes / touchmouse.js
Created April 13, 2012 10:43
This snippet maps mouse events and touch events onto one single event. This makes it easier in the code since you have to listen to only one event regardles whether it's desktop or mobile.
(function() {
/* == GLOBAL DECLERATIONS == */
TouchMouseEvent = {
DOWN: "touchmousedown",
UP: "touchmouseup",
MOVE: "touchmousemove"
}
/* == EVENT LISTENERS == */
.fc {
direction: ltr;
text-align: left; }
.fc table {
border-collapse: collapse;
border-spacing: 0; }
.fc .btn {
line-height: 1.2em; }
html .fc {

FrontCalendar

Na falta de um site decente e realmente atualizado com os eventos de front-end que vão rolar, dê um pulo aqui ;)

Finalmente temos um site decente para listar os eventos, por isso a partir de agora essa lista não será mais atualizada e todos os esforços estarão concentrados na página de Eventos do BrazilJS.

@dcneiner
dcneiner / tools.md
Created February 23, 2013 11:46
A list of tools I use on a regular basis.

@gpoitch
gpoitch / google_analytics_mixin.js
Last active December 16, 2015 16:40
A Google Analytics mixin for an Ember application controller. Sends a page view whenever the currentPath (url) changes. Normalizes the page url for both history and hash location routers.
Ember.GoogleAnalytics = Ember.Mixin.create({
trackPageView: function() {
if(!Ember.isNone(ga)) {
Ember.run.next(function() {
var loc = window.location,
page = loc.hash ? loc.hash.substring(1) : loc.pathname + loc.search;
ga('send', 'pageview', page);
});
}