Skip to content

Instantly share code, notes, and snippets.

View hcientist's full-sized avatar

Michael Stewart hcientist

View GitHub Profile
@hcientist
hcientist / .java
Created December 5, 2016 02:13
phoenixifyColor
public static Color phoenixifyColor(Color originalPixelColor) {
// https://www.elon.edu/e/university-communications/identity/colors.html
final Color PHOENIX_MAROON = new Color(115, 0, 10);
final Color PHOENIX_GOLD = new Color(181, 154, 87);
// linear phoenixify
// final double RED_FACTOR = (PHOENIX_GOLD.getRed() -
// PHOENIX_MAROON.getRed()) / MAX_COLOR_VALUE;
// final double GREEN_FACTOR = (PHOENIX_GOLD.getGreen() -
// PHOENIX_MAROON.getGreen()) / MAX_COLOR_VALUE;
@hcientist
hcientist / .block
Last active April 1, 2017 19:56 — forked from mbostock/.block
Collapsible Force Layout
license: gpl-3.0
@hcientist
hcientist / .block
Last active April 2, 2017 14:13 — forked from mbostock/.block
Force-Directed Graph
license: gpl-3.0
height: 600
@hcientist
hcientist / .block
Last active April 3, 2017 18:41 — forked from mbostock/.block
Modifying a Force Layout
license: gpl-3.0
@hcientist
hcientist / .gitignore
Created April 3, 2017 22:53 — forked from GerHobbelt/.gitignore
d3.js: using layout.force to plot tree graphs (where nodes may have multiple parents) - Part 1: pure tree
# Editor backup files
*.bak
*~
@hcientist
hcientist / .block
Created April 11, 2017 18:32 — forked from mbostock/.block
Radial Tidy Tree
license: gpl-3.0
border: no
height: 1060
@hcientist
hcientist / .block
Last active April 11, 2017 20:26 — forked from mbostock/.block
Force-Directed Tree
license: gpl-3.0
@hcientist
hcientist / .block
Created April 15, 2017 19:22 — forked from mbostock/.block
Force-Directed Tree
license: gpl-3.0
height: 960
@hcientist
hcientist / loadAllYT.js
Created April 24, 2017 17:43
tries to click all elements on a page with the class 'load-more-button' (useful to fully "hydrate" a youtube page)
javascript:(function(){var noMoreCt = 0; var loadMoreInterval = window.setInterval(function () {var btns = document.getElementsByClassName('load-more-button'); if (btns.length > 0) {Array.prototype.forEach.call(btns,function (btn){btn.click();console.log('clicked');});} else {if(noMoreCt >=4) {window.clearInterval(loadMoreInterval);} else {noMoreCt++;}}}, 250);})();
@hcientist
hcientist / submission.hmtl
Created March 26, 2019 04:32
html quiz response
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Hello World</title>
<script type="text/javascript">
setTimeout(function() { console.log("hello world") }, 2000);
</script>
</head>
<body>