Skip to content

Instantly share code, notes, and snippets.

View camray's full-sized avatar

Cam Ray camray

  • Pittsburgh, PA
View GitHub Profile
# In this project, let's create a grade calculator to generate a student's
# final grade for a course.
# Each submission has a score and points possible. Submissions belong to an
# assignment_group. Each assignment_group has a weight. A group that is
# weighted at 0.25 means that the score earned in that group will add up to
# 25% of the final grade. You can assume that all of the weights of all of
# the groups add up to 1. Consider how you will keep this algorithm performant
# since some courses are exceptionally large, and this function will be called
# many, many times per day.
@camray
camray / keybase.md
Created December 21, 2017 16:23
keybase.md

Keybase proof

I hereby claim:

  • I am camray on github.
  • I am camray (https://keybase.io/camray) on keybase.
  • I have a public key ASBd3fm-dNHm-KePw9rIyqhvikBBZawoCxi185MQCUQF5go

To claim this, I am signing this object:

@camray
camray / GVimrc
Created September 16, 2016 18:43
" Leader
let mapleader = " "
set backspace=2 " Backspace deletes like most programs in insert mode
set nobackup
set nowritebackup
set noswapfile " http://robots.thoughtbot.com/post/18739402579/global-gitignore#comment-458413287
set history=50
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
@camray
camray / .vimrc
Last active July 2, 2018 17:44
My partial .vimrc, mostly stolen
"" Leader
let mapleader = " "
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'altercation/vim-colors-solarized'
@camray
camray / syl.ruby
Last active February 12, 2016 19:18
Finds a random wikipedia article that (maybe sometimes) matches the Teenage Mutant Ninja Turtles song. A ruby script based on http://www.xkcd.com/1412/
require 'httparty'
require 'odyssey'
def get_a_random_wiki_title
response = HTTParty.get('https://en.wikipedia.org/w/api.php?action=query&generator=random&grnnamespace=0&format=json')
parsed_response = JSON.parse(response.body)
parsed_response['query']['pages'].first()[1]['title']
end
found = false
@camray
camray / Business Model Generator
Created September 10, 2014 20:27
Use buzzwords to generate your new business moldel
<html>
<head>
<title>Business Ideas</title>
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="jumbotron">
<h3 id="business-model"></h3>
</div>
<script>
@camray
camray / Example HTML Page
Created November 14, 2013 03:28
Example HTML Page
<!DOCTYPE html>
<html>
<head>
<title>Title of the Webpage</title>
<link rel="stylesheet" href="css.css">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<header>
<h2>Like This</h2>