Skip to content

Instantly share code, notes, and snippets.

View lanrion's full-sized avatar
🎯
Focusing

lanrion lanrion

🎯
Focusing
  • guǎng zhōu
View GitHub Profile
/*!
* jQuery TextChange Plugin
* http://www.zurb.com/playground/jquery-text-change-custom-event
*
* Copyright 2010, ZURB
* Released under the MIT License
*/
(function ($) {
$.event.special.textchange = {
@lanrion
lanrion / OPML
Created May 27, 2012 14:10 — forked from hooopo/OPML
opml.xml
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Google 阅读器中 Hooopo 的订阅</title>
</head>
<body>
<outline text="(未知标题)" title="(未知标题)" type="rss"
xmlUrl="http://thoughtrails.com/feeds.atom" htmlUrl="http://thoughtrails.com"/>
<outline text="(未知标题)" title="(未知标题)" type="rss"
xmlUrl="http://confreaks.net/feeds2.feedburner.com/confreaks-general" htmlUrl="http://www.google.com/reader/view/feed%2Fhttp%3A%2F%2Fconfreaks.net%2Ffeeds2.feedburner.com%2Fconfreaks-general"/>
@lanrion
lanrion / OPML
Created May 27, 2012 14:14 — forked from hooopo/OPML
opml.xml
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Google 阅读器中 Hooopo 的订阅</title>
</head>
<body>
<outline text="(未知标题)" title="(未知标题)" type="rss"
xmlUrl="http://thoughtrails.com/feeds.atom" htmlUrl="http://thoughtrails.com"/>
<outline text="(未知标题)" title="(未知标题)" type="rss"
xmlUrl="http://confreaks.net/feeds2.feedburner.com/confreaks-general" htmlUrl="http://www.google.com/reader/view/feed%2Fhttp%3A%2F%2Fconfreaks.net%2Ffeeds2.feedburner.com%2Fconfreaks-general"/>
@lanrion
lanrion / 360buy.rb
Created November 4, 2012 15:55 — forked from mimosz/.gitignore
京东商品价格解析
# -*- encoding: utf-8 -*-
require 'mini_magick'
require 'rtesseract'
require 'nokogiri'
require 'nestful'
require 'csv'
require 'pp'
class Buy360
def initialize(url='')
@lanrion
lanrion / 360buy.rb
Created January 23, 2013 09:57 — forked from mimosz/.gitignore
# -*- encoding: utf-8 -*-
require 'mini_magick'
require 'rtesseract'
require 'nokogiri'
require 'nestful'
require 'csv'
require 'pp'
class Buy360
def initialize(url='')
require 'rubygems'
require 'eventmachine'
children = []
Signal.trap('SIGINT') do
EventMachine.next_tick { EventMachine.stop_event_loop }
end
Signal.trap('EXIT') do

Getting started

First add your twitter username and password. Then server.rb and once it's started open websocket.html in your browser. You should see some tweets appear. If not take a look at the javascript console.

data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>

Capybara

save_and_open_page

Matchers

have_button(locator)