Skip to content

Instantly share code, notes, and snippets.

Matthew Bernhardt matt-bernhardt

Block or report user

Report or block matt-bernhardt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@matt-bernhardt
matt-bernhardt / README.md
Last active Aug 29, 2015
Interactive Force Directed Graph
View README.md

A page with input sliders for the two primary parameters, LinkDistance and Charge. Adjusting either slider will momentarily stop the force animation, adjust the parameter, and then restart the animation with the new values.

View index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en">
<head>
<meta charset="utf-8">
<title>Force based label placement</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.6.0"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?2.6.0"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.js?2.6.0"></script>
</head>
<body>
View Crew_Attendance.csv
MatchTime CrewScore Opponent OppScore VenueName Attendance Temperature Year Month Day DaysSince NewVenue DaysSinceCategory
4/13/1996 19:30 4 D.C. United 0 Ohio Stadium 25266 60 1996 4 13 1 Opener
4/20/1996 19:30 1 Tampa Bay Mutiny 2 Ohio Stadium 24343 66 1996 4 20 7 2 One Week
5/11/1996 0:00 3 New England Revolution 2 Ohio Stadium 24750 56 1996 5 11 20 3 Three Weeks
5/19/1996 0:00 2 Colorado Rapids 4 Ohio Stadium 20184 78 1996 5 19 8 4 One Week
6/8/1996 0:00 3 Sporting Kansas City 3 Ohio Stadium 16526 67 1996 6 8 20 5 Three Weeks
6/19/1996 0:00 2 Colorado Rapids 2 Ohio Stadium 13093 78 1996 6 19 11 6 One Week
6/30/1996 0:00 0 Red Bull New York 4 Ohio Stadium 17261 84 1996 6 30 11 7 One Week
7/11/1996 0:00 1 New England Revolution 1 Ohio Stadium 13751 68 1996 7 11 11 8 One Week
7/20/1996 0:00 3 San Jose Earthquakes 4 Ohio Stadium 18156 67 1996 7 20 9 9 One Week
@matt-bernhardt
matt-bernhardt / load-hours.js
Last active Aug 29, 2015
A bit of javascript to dynamically load library hours
View load-hours.js
/*globals jQuery,document,console */
function FindToday(testDay) {
'use strict';
var today, d, m, yy;
if (!testDay) {
today = new Date();
d = today.getDate();
m = today.getMonth() + 1;
yy = today.getFullYear();
today = m + '/' + d + '/' + yy;
@matt-bernhardt
matt-bernhardt / graph_explorer.html
Created Jul 28, 2014
Interactive alteration of force-directed graph visualization
View graph_explorer.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>D3 Vision Quest - Network Explorer</title>
<script src="/scripts/jquery-1.9.1.js"></script>
<script src="/scripts/d3.v3.min.js" charset="utf-8"></script>
<link rel="stylesheet" type="text/css" href="/styles/reset.css">
<link rel="stylesheet" type="text/css" href="/styles/d3vq.css">
<style type="text/css">
@matt-bernhardt
matt-bernhardt / footer.html
Created Aug 7, 2014
LibGuides Group - L&T
View footer.html
@matt-bernhardt
matt-bernhardt / css-js.html
Last active Aug 29, 2015
Libguides Group - Moth Design
View css-js.html
<meta name="viewport" content="width=device-width, maximum-scale=1">
<style>
/*
*** Libguides overrides
*/
body {
font-size: 16px;
}
footer h4 {
font: inherit;
@matt-bernhardt
matt-bernhardt / 1_about.txt
Last active Aug 29, 2015
Libguides Group - L&T Fallback
View 1_about.txt
This gist contains code for the current (August 15, 2014) theme in use on libguides.mit.edu.
View goals_by_ppg.vbs
Option Explicit
Dim oFSO
Dim LogFile 'logfile object
Dim conn 'db connection
Dim cst 'db connection string
Dim rs, rs1 'recordset object
Dim SQL 'SQL query statement
Dim x,y,z 'counter variables
Dim strLogFile 'Files created by this script
@matt-bernhardt
matt-bernhardt / crew-impact-table-141110.csv
Created Oct 7, 2014
Columbus Crew Impact Data - 10/7/2014
View crew-impact-table-141110.csv
## ID Player Name Team Minutes Team Minutes Pctg Plus PlusRate TeamPlus PctgPlus Minus MinusRate TeamMinus PctgMinus Scoring ScoringRate Difference
91 3672 Bernardo Anor Columbus Crew 1484 2793 0.53 18 82.4 44 0.41 20 74.2 38 0.53 38 39.1 -2
92 3871 Jairo Arrieta Columbus Crew 1157 2793 0.41 17 68.1 44 0.39 15 77.1 38 0.39 32 36.2 2
93 4198 Fifi Baiden Columbus Crew 17 2793 0.01 0 44 0.00 2 8.5 38 0.05 2 8.5 -2
94 3901 Chad Barson Columbus Crew 734 2793 0.26 12 61.2 44 0.27 14 52.4 38 0.37 26 28.2 -2
95 4155 Adam Bedell Columbus Crew 632 2793 0.23 13 48.6 44 0.30 11 57.5 38 0.29 24 26.3 2
96 4145 Steve Clark Columbus Crew 2790 2793 1.00 44 63.4 44 1.00 38 73.4 38 1.00 82 34.0 6
97 3863 Ethan Finlay Columbus Crew 1654 2793 0.59 33 50.1 44 0.75 25 66.2 38 0.66 58 28.5 8
98 4154 Waylon Francis Columbus Crew 2021 2793 0.72 32 63.2 44 0.73 26 77.7 38 0.68 58 34.8 6
99 4238 Romain Gall Columbus Crew 16 2793 0.01 0 44 0.00 0 38 0.00 0 0
You can’t perform that action at this time.