Skip to content

Instantly share code, notes, and snippets.

View johngrant's full-sized avatar
🛹

John Grant johngrant

🛹
View GitHub Profile
@MichaelDimmitt
MichaelDimmitt / graph_producer.js
Created August 31, 2020 00:48
Lets me make graphs sequentially or with an air or randomness for highcharts https://www.highcharts.com/docs/chart-and-series-types/network-graph
const alphabet = [
'a', 'b', 'c', 'd', 'e','f','g','h','i','j','k','l','m',
'n','o','p','q','r','s','t','u','v','w','x','y','z'
]
const deepCopyAlphabet = () => JSON.parse(JSON.stringify(alphabet));
const getRandomInt = (arr) => Math.floor((Math.random() * arr.length))
let mainGraph = []
const connectNodesByNumber = ({letter, num, arr, mainGraph, isRandom}) => {
@johngrant
johngrant / Interrogating script bundle
Created March 24, 2015 18:27
Prototype code used to enumerate the files in a bundle at runtime then serialize to JS array the bundle or the contents based on the DEBUG symbols
@{
var includes = "[]";
var bundleName = "~/bundles/agent-profile";
if (!BundleTable.EnableOptimizations)
{
var resolver = new BundleResolver();
var url = resolver.GetBundleContents(bundleName).Select(s => string.Format("'{0}'", Url.Content(s)));
includes = "[" + string.Join(",", url) + "]";
}
else
Do you like interesting problems? Do you keep a notepad/laptop next to your bed because you tend to solve problems while sleeping? We might be a good fit.
We are a totally distributed team. Everyone works from home (even if home tends to be in airplanes). Most of the code we write is Open Source and is available on github http://github.com/eventstore/eventstore if you want to look through it. The team completely owns the project.
Perhaps we could be a good fit for you, we are seeking developers who are:
1) Always improving
2) Highly Technical
3) Capable of working in a remote environment
4) Independent
@yxkelan
yxkelan / gist:5095821
Last active December 14, 2015 13:48
The assertion, from "Secrets of JavaScript Ninja". 1, Simple test assertion function. 2, Test groups. 3, Asynchronous testing.
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
<style>
li.pass{
color:green;
}
li.fail{