Mockups
Neutrals
- white grey: #eaeff2
Mockups
Neutrals
require 'open-uri' | |
require 'nokogiri' | |
class BookScraper | |
def self.find_book(isbn) | |
# Query ISBNsearch and get resulting HTML page with book details | |
book_page = Nokogiri::HTML(open("http://isbnsearch.org/isbn/#{isbn}")) | |
book_info = Hash.new |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Alert Testing</title> | |
<link href="alert.css" rel="stylesheet" type="text/css"> | |
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" type="text/css"> | |
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"> | |
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script> |
{ | |
"timestamp": 201511272234, | |
"our_score": 2, | |
"their_score": 6, | |
"decision": "L", | |
"elo_delta": -8, | |
"players": [ | |
{ | |
"name": "heatingamer008", | |
"score": 1090, |
class APILogger < Grape::Middleware::Base | |
def before | |
request_method = env['REQUEST_METHOD'] | |
Rails.logger.info "REQUEST METHOD:\t#{request_method}" | |
Rails.logger.info "REQUEST PATH:\t#{env['REQUEST_PATH']}" | |
Rails.logger.info "QUERY STRING:\t#{env['QUERY_STRING']}" | |
Rails.logger.info "POST PARAMS:\t#{env['rack.request.form_hash']}" if request_method == 'POST' | |
end |
function isValidCreditCard(number) { | |
var len = number.length, | |
multiply = 1, | |
sum = 0, | |
val; | |
while (len--) { | |
val = parseInt(number.charAt(len), 10); | |
sum += (multiply ^= 1) ? Math.trunc(val * 2 / 10) + (val * 2 % 10) : val; |