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 casper = require('casper').create({ | |
pageSettings: { | |
// javascriptEnabled: false | |
} | |
}); | |
var system = require('system'); | |
var options = casper.cli.options; |
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 pg = require('pg'); | |
var Service = function (connectionConfig) { | |
this.connectionConfig = connectionConfig; | |
this._client = null; | |
this._releaseClient = null; | |
this.isConnected = false; | |
}; | |
Service.prototype._connection = function (callback) { |
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
# Count greped lines | |
grep pattern | wc -l | |
# Count greped lines, and display them | |
grep pattern | tee /dev/tty | wc -l |
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
for word in "$@" | |
do | |
args=true | |
newQueues=$(rabbitmqctl list_queues name | grep "$word") | |
queues="$queues | |
$newQueues" | |
done | |
if [ $# -eq 0 ]; then | |
queues=$(rabbitmqctl list_queues name | grep -v "\.\.\.") | |
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
"use strict"; | |
var slug = require('slug'); | |
var hashFunctions = { | |
/** | |
* Return string hash, based on first two symbols of string | |
* @param {string} str Str to calculate the hash | |
*/ | |
"two_symbol_hash": function (str) { |
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
config.json | |
reading-image.png |
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 o = { data: { success: true } } | |
maybe('o') | |
.with('data') | |
.with('success') | |
.if(function(x){ | |
return x === true; | |
}) | |
.do(function(x){ | |
if(x === null){return "if failed"} else{ return "if succeded"} |
NewerOlder