Skip to content

Instantly share code, notes, and snippets.

View dukex's full-sized avatar
✔️
Verified Account

Duke dukex

✔️
Verified Account
View GitHub Profile
@dukex
dukex / hack.rb
Created March 29, 2012 16:46
New API Proposal to Sally
Sally.start do
analise do
target "url.com"
data { uf: "SP" }
method "POST" # or GET
end
search_and_extract root: "ul#any_resource li" do # root default is html
data :name, "div a" # like -> ul li div a
data :desc, "#content p" do |p|
p.text # passed the element, in example p
@dukex
dukex / hack.sally
Created March 29, 2012 16:43
First API Proposal to Sally
My target 'evinicius.com'
I want the links of '#posts' list
Export to 'XML'
@dukex
dukex / install.sh
Created June 20, 2011 04:29
ambiente
open "http://code.google.com/p/iterm2/downloads/list"
open "https://github.com/kennethreitz/osx-gcc-installer"
sudo /Developer/Library/uninstall-devtools –mode=all
ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
brew update
brew install git
brew install mysql
@dukex
dukex / jasmine.js
Created April 27, 2011 23:45
qUnit Vs Jasmine
describe("accessibility", function () {
beforeEach(function(){
var ac = $('#menu1').menu();
var item0 = $("li:eq(0) a");
});
it("should has menu class", function(){
expect(ac.hasClass("ui-menu ui-widget ui-widget-content ui-corner-all")).toEqual(true);
});
@dukex
dukex / string.js
Created April 3, 2011 04:11
string_spec.js
String.prototype.reverse = function(){
return this.split("").reverse().join("");
}