This file contains 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
def rating | |
url_path = '/rating';# + id | |
header "Accept", "text/xml" | |
visit( | |
@url + url_path, | |
:post | |
) | |
end |
This file contains 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/perl | |
use strict; | |
use warnings; | |
use WWW::Mechanize; | |
use HTML::TreeBuilder; | |
my $agent = WWW::Mechanize->new(); | |
$agent->get("http://www.gumtree.com/london/79/52349379.html"); |
This file contains 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/perl | |
use strict; | |
use warnings; | |
use WWW::Mechanize; | |
_search(); | |
sub _search { | |
#do search |
This file contains 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
http://www.centuryfurniture.com/RetailerLocator/Locate.aspx | |
POST /RetailerLocator/Locate.aspx HTTP/1.1 | |
Host: www.centuryfurniture.com | |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.11) Gecko/2009060214 Firefox/3.0.11 | |
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 | |
Accept-Language: en-us,en;q=0.5 | |
Accept-Encoding: gzip,deflate | |
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 | |
Keep-Alive: 300 |
This file contains 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 perl | |
use Modern::Perl; | |
use File::Find; | |
#-------------------------------------------------- | |
# no getopt since its very simple | |
#-------------------------------------------------- | |
die "Enter a directory to search\nUsage: perl $0 <dir_path>" unless @ARGV; | |
my $total_size = 0; |
This file contains 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
> db.linkedin_skills.find({displayName: "TOGAF"}).pretty() | |
{ | |
"_id" : ObjectId("51659c9ee138231e2b000c01"), | |
"displayName" : "TOGAF", | |
"generated_from" : "to", | |
"growth_rate_decreasing" : "", | |
"growth_rate_increasing" : "2%", | |
"headLine" : "<strong>TO</strong>GAF", | |
"linkedin_id" : "5056", | |
"primary_industry" : "Information Technology and Services", |
This file contains 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
- id: | |
bioguide: B000944 | |
thomas: '00136' | |
lis: S307 | |
govtrack: 400050 | |
opensecrets: N00003535 | |
votesmart: 27018 |
This file contains 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
<% if signed_in? %> | |
<div class="row"> | |
<aside class="span4"> | |
<section> | |
<%= render 'shared/user_info' %> | |
</section> | |
<section> | |
<%= render 'shared/stats' %> | |
</section> | |
<section> |
This file contains 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
# ONLY ALLOW REGISTER WHEN SIGNED OUT | |
if ($v{'user_id'} ne '') { | |
# PAGE TELLING USER TO SIGN OUT | |
} else { | |
# THERE ARE 2 POSSIBILITIES HERE | |
# 1. NEW USER AND WE"RE GOING TO PROVIDE THEM REGISTRATION FORM | |
# 2. SUBMITTED PARAMETERS FROM USER REGISTRATION FORM | |
# AND WE'RE GOING TO PROVIDE THEM CHECKBOXES TO SUBSCRIBE, |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE html | |
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<title>RSpec results</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta http-equiv="Expires" content="-1" /> | |
<meta http-equiv="Pragma" content="no-cache" /> |
OlderNewer