This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setInterval( | |
function() { | |
Array.prototype.slice.call( | |
document.querySelectorAll('[data-reactid]') | |
).forEach(function(element) { | |
element.style.background = 'rgba(255,0,0,0.1)'; | |
}); | |
}, 500 | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// based on http://onais-m.blogspot.nl/2014/10/automatic-graph-layout-with-javascript.html | |
var jsp = jsPlumb.getInstance(); | |
// construct dagre graph from JsPlumb graph | |
/* global dagre */ | |
var g = new dagre.graphlib.Graph(); | |
g.setGraph({}); | |
g.setDefaultEdgeLabel(function() { return {}; }); | |
$('.xnode').each( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(HistData) | |
galton <- Galton | |
y <- galton$child | |
x <- galton$parent | |
freqData <- as.data.frame(table(galton$child, galton$parent)) | |
names(freqData) <- c("child", "parent", "freq") | |
plot(as.numeric(as.vector(freqData$parent)), | |
as.numeric(as.vector(freqData$child)), | |
pch = 21, col = "black", bg = "lightblue", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm | |
# Try to load via project-specific .nvmrc | |
nvm use > /dev/null 2>&1 | |
if [ $? -ne 0 ]; then | |
# Use default - set with 'nvm alias default v0.12.1' | |
nvm use default | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: playframework | |
# Required-Start: $local_fs $remote_fs $network $syslog | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start/Stop playframework | |
### END INIT INFO | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var escodegen = require('escodegen'); | |
var parse = require("esprima").parse; | |
var fs = require("fs"); | |
var src = fs.readFileSync( | |
"test.js", | |
"utf-8" | |
); | |
var ast = parse(src); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set vertical-split = false | |
set git-colors = yes | |
set show-changes = yes | |
set commit-order = topo | |
set refresh-mode = auto | |
set main-view = \ | |
date:default \ | |
author:full \ | |
id:yes,color \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var key = 'name'; | |
return objs.sort(function (a, b) { | |
if (a[key] > b[key]) { | |
return asc ? 1 : -1; | |
} else if (a[key] < b[key]) { | |
return asc ? -1 : 1; | |
} else { | |
return 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="row row-no-padding wrapper"> | |
<div class="sidebar-left-wrapper"> | |
Left | |
</div> | |
<div class="page-content-wrapper"> | |
Content | |
</div> | |
<div class="sidebar-right-wrapper"> | |
Right | |
</div> |