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
cpanm (App::cpanminus) 1.5007 on perl 5.014002 built for x86_64-linux-gnu-thread-multi | |
Work directory is /home/vagrant/.cpanm/work/1340362527.17211 | |
You have make /usr/bin/make | |
You have LWP 6.04 | |
You have /bin/tar: tar (GNU tar) 1.26 | |
Copyright (C) 2011 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. |
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
5 months | |
18,096 sitemap validations (120 sitemap validations/day) | |
434,672 page validations (2897 page validations/day) | |
226 registered users | |
$382 spent ($2.55/day) | |
How much does a page validation cost? | |
$382 / 434,672 = 0.00087 | |
Rounded up... $0.001 per page validation |
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
require 'right_aws' | |
s3_credentials = { | |
:source_key => "...", | |
:source_secret => "...", | |
:source_bucket => "...", | |
:destination_key => "...", | |
:destination_secret => "...", | |
:destination_bucket => "..." | |
} |
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
# coding: utf-8 | |
# ======================================== | |
# Resource Owner Password Credentials flow | |
# ======================================== | |
# | |
# In this flow, a token is requested in exchange for the resource owner | |
# credentials (username and password): | |
# | |
# http://tools.ietf.org/html/draft-ietf-oauth-v2-25#page-9 |
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
# This example API will recognize users that have authenticated via a web form, | |
# but it fails authenticating from http_basic_auth, which has been enabled in Devise for this app | |
# curl -v -u "[email protected]:herpassword" http://localhost:3000/api/my_email | |
module MyApp | |
class API < Grape::API | |
prefix 'api' | |
helpers do | |
def warden |
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
This is a draft of the upcoming W3Clove RESTful API. | |
By now it will allow to submit a sitemap or webpage URL for validation, see the results and ask for re-checking later. | |
It doesn't yet allow user authentication, so you can't manage your list of sitemaps as it can be done on the web site. | |
URI params will be passed URLencoded; here they appear whithout encoding for legibility purposes. | |
Single entry point | |
================== |
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
# This allows to use a numeric or a lambda | |
def retry_upto(max_retries = 1, options = {}) | |
begin | |
return yield if ((max_retries -= 1) > 0) | |
rescue (options[:rescue_only] || Exception) | |
if options[:patience] | |
if options[:patience].is_a?(Numeric) | |
options[:wait] = options[:wait] * options[:patience] | |
else |
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
$(function() { | |
function split( val ) { | |
return val.split( /,\s*/ ); | |
} | |
function extractLast( term ) { | |
return split( term ).pop(); | |
} | |
$( "#new_interest" ).autocomplete({ |
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
/Users/jaime/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb | |
/usr/local/bin/qmake | |
cd src/ && /usr/local/bin/qmake /Users/jaime/.rvm/gems/ruby-1.9.2-p290@qoolife/gems/capybara-webkit-0.5.0/src/webkit_server.pro -spec /usr/local/Cellar/qt/4.7.3/mkspecs/macx-g++ -o Makefile.webkit_server | |
cd src/ && make -f Makefile.webkit_server | |
g++ -c -pipe -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Cellar/qt/4.7.3/mkspecs/macx-g++ -I. -I/usr/local/Cellar/qt/4.7.3/lib/QtCore.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.7.3/lib/QtCore.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.7.3/lib/QtNetwork.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.7.3/lib/QtNetwork.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.7.3/lib/QtGui.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.7.3/lib/QtGui.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.7.3/lib/QtWebKit.framework/Versions/ |
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
describe Page do | |
include PageSpecHelper | |
context "Creation" do | |
before(:each) do | |
@page = Page.new | |
end | |
it "should be valid with valid attributes" do | |
@page.attributes = valid_page_attributes |