Skip to content

Instantly share code, notes, and snippets.

@bcoryat
bcoryat / start_ext.sh
Last active September 13, 2018 18:19
set -o nounset -o errexit
CONF_DIR="$HOME/.jupyter"
CONF_FILE="${CONF_DIR}/jupyter_notebook_config.py"
mkdir -p "${CONF_DIR}"
PREFIX=/${DOMINO_PROJECT_OWNER}/${DOMINO_PROJECT_NAME}/notebookSession/${DOMINO_RUN_ID}/
cat >> $CONF_FILE << EOF
c = get_config()

Keybase proof

I hereby claim:

  • I am bcoryat on github.
  • I am blossomc (https://keybase.io/blossomc) on keybase.
  • I have a public key ASBdbQv5SV6tUYF0FJy8BLpv7tjwjmY5aSSGnfV8uPlR3go

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am bcoryat on github.
  • I am blossomc (https://keybase.io/blossomc) on keybase.
  • I have a public key whose fingerprint is D53C F424 B455 8FDB 827F 49D3 1121 7E80 36EB 6831

To claim this, I am signing this object:

@bcoryat
bcoryat / forcedirected.js
Created December 1, 2013 02:00
Creates a force directed graph based on profile documents in MarkLogic server. Uses the force directed graph visualization of the Javascript InfoVis Toolkit. This was created before MarkLogic version 7 else i would have used the triple store and semantic functions.
var labelType, useGradients, nativeTextSupport, animate;
(function () {
var ua = navigator.userAgent,
iStuff = ua.match(/iPhone/i) || ua.match(/iPad/i),
typeOfCanvas = typeof HTMLCanvasElement,
nativeCanvasSupport = (typeOfCanvas == 'object' || typeOfCanvas == 'function'),
textSupport = nativeCanvasSupport && (typeof document.createElement('canvas').getContext('2d').fillText == 'function');
//I'm setting this based on the fact that ExCanvas provides text support for IE
//and that as of today iPhone/iPad current text support is lame
mongos> sh.status()
--- Sharding Status ---
sharding version: { "_id" : 1, "version" : 3 }
shards:
{ "_id" : "sod_shrd_0001", "host" : "localhost:28001", "tags" : [ "oid 3" ] }
{ "_id" : "sod_shrd_0002", "host" : "localhost:28002", "tags" : [ "oid 3" ] }
{ "_id" : "sod_shrd_0003", "host" : "localhost:28003" }
databases:
{ "_id" : "admin", "partitioned" : false, "primary" : "config" }
{ "_id" : "sod1", "partitioned" : true, "primary" : "sod_shrd_0001" }