Skip to content

Instantly share code, notes, and snippets.

View arempe93's full-sized avatar

Andrew Rempe arempe93

View GitHub Profile
@arempe93
arempe93 / Resources.md
Last active August 24, 2016 14:32
Developer Resources
@arempe93
arempe93 / Stats.md
Last active June 21, 2019 14:41
NHL Stats Scraping Information

NHL Stats Scraping

PlayByPlay

Has detailed information on all events of the following types:

  • Shots
  • Hits

Contributing

Basic guidelines for development, deployment, and source control

Coding Style

When writing code it is generally a good idea to try and match your formatting to that of any existing code in the same file, or to other

@arempe93
arempe93 / book_scraper.rb
Last active August 29, 2015 14:16
A simple book information scraper by ISBN....with images!
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
@arempe93
arempe93 / instructions.md
Last active December 2, 2018 23:03
Resume Template

Resume Template

To use:

  • Download the gist using the button on the right and unzip
  • Edit the html file with your information
  • Open the html file in chrome
  • Press control + p to print
  • Select print to PDF and choose the paper size "Tabloid"
@arempe93
arempe93 / alert.html
Last active September 19, 2015 04:57
Alert concept
<!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>
@arempe93
arempe93 / example.json
Last active November 30, 2015 03:40
Example Game Capture
{
"timestamp": 201511272234,
"our_score": 2,
"their_score": 6,
"decision": "L",
"elo_delta": -8,
"players": [
{
"name": "heatingamer008",
"score": 1090,
@arempe93
arempe93 / colors.md
Last active July 3, 2019 13:49
Favorite colors for web design

Blues

Color Hex
baby: #81cfe0
pastel: #8fa5f0
primary: #449bc8
versatile: #3e86c7
deep-dark: #192738
dark soft: #3887be
@arempe93
arempe93 / api_logger.rb
Last active January 28, 2016 21:40
Grape Middlewares
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
@arempe93
arempe93 / luhns.js
Created February 22, 2016 20:26
Javascript credit card validator using Luhn's Algorithm
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;