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
#!/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
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
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
// 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
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
function listServices(mod, r) { | |
var inj = angular.element(document).injector().get; | |
if (!r) { | |
r = {}; | |
} | |
angular.forEach(angular.module(mod).requires, | |
function(m) { | |
listServices(m,r) | |
}); | |
angular.forEach(angular.module(mod)._invokeQueue, |
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
connect: { | |
app: { | |
options: { | |
port : 9000, | |
base : '<%= appRoot %>/', | |
open : true, | |
livereload : true, | |
hostname : '127.0.0.1' | |
middleware : function(connect) { | |
return [ |
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
[Desktop Entry] | |
Type=Application | |
Name=Android Studio | |
Comment=Android Studio Integrated Development Environment | |
Icon=/opt/android-studio/bin/androidstudio.ico | |
Exec=/opt/android-studio/bin/studio.sh | |
Terminal=false | |
Categories=Development;IDE;Java;Android |
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
# .local/share/applications/eclipse.desktop | |
[Desktop Entry] | |
Type=Application | |
Name=Eclipse | |
Comment=Eclipse Integrated Development Environment | |
Icon=/opt/eclipse/icon.xpm | |
Exec=/opt/eclipse/eclipse | |
Terminal=false | |
Categories=Development;IDE;Java; |