This file contains 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
rpm --import http://elrepo.org/RPM-GPG-KEY-elrepo.org | |
rpm -Uvh http://elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpm | |
yum install ffmpeg |
This file contains 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
alias killws="ps -Alf |grep -i webstorm |grep -v grep |awk -F' ' '{print \$4}' |xargs kill -9 " |
This file contains 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
# git is installed under /usr/local/git/bin/ | |
ls -1 /usr/local/git/bin/ |xargs -INAME sudo rm -f /usr/bin/NAME | |
ls -1 /usr/local/git/bin/ |xargs -INAME sudo ln -s /usr/local/git/bin/NAME /usr/bin/NAME |
This file contains 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/plugin -i elasticsearch/marvel/latest |
This file contains 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
MATCH (a)-[r]->(b) | |
WHERE type(r) = 'ACTED_IN' | |
RETURN type(r), labels(a), labels(b) | |
LIMIT 100 |
This file contains 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
# show routing (with rule numbers per Chain fortable:"nat") | |
alias routing='sudo iptables -t nat -L -n -v --line-number' | |
# open 80 explicitly | |
# sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT | |
# redirect 80 to 8080 | |
# iptables -t nat -A OUTPUT -o lo -p tcp --dport 80 -j REDIRECT --to-port 8080 | |
# delete a rule (table:"nat", Chain:"OUTPUT" rule:1) |
This file contains 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
/** | |
* Usage: | |
* var dataServiceInfo = wrapForCallInfo(require('../services/data').prototype); | |
* process.on('exit', function() { | |
* dataServiceInfo.print('DataService'); | |
* }); | |
* | |
* @param {Object} toWrap an object (or its prototype) to wrap for call statistics gathering. | |
* @returns {{print:function, data:Object}} | |
*/ |
This file contains 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
'use strict'; | |
var clarinet = require('clarinet'); | |
/** | |
* Extract a detailed JSON parse error | |
* using https://github.com/dscape/clarinet | |
* | |
* @param {string} json | |
* @returns {{snippet:string, message:string, line:number, column:number, position:number}} or undefined if no error | |
*/ |
This file contains 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() { | |
var childProcess = require("child_process"); | |
var oldSpawn = childProcess.spawn; | |
function mySpawn() { | |
console.log('spawn called'); | |
console.log(arguments); | |
return oldSpawn.apply(this, arguments); | |
} | |
childProcess.spawn = mySpawn; | |
})(); |
This file contains 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
'use strict'; | |
var state = false; | |
function readbin(_state) { | |
if (_state === state) { | |
console.log('not changing state (' + state + ')'); | |
return; | |
} | |
console.log('changing state (' + _state + ')'); | |
OlderNewer