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
| curl -s http://localhost:9100/metrics | curl --data-binary @- http://pushgateway.example.org:9091/metrics/job/some_job/instance/some_instance |
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
| using System; | |
| using System.Collections.Generic; | |
| namespace Orbital | |
| { | |
| public class RK | |
| { | |
| public struct fValues |
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
| ^((?!16).|\s)*$ |
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
| ssh -i KEY -C2qTnN -D 8080 USER@HOST |
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
| find . -name "*.pdf" -print0 | xargs -0 rm | |
| find . -name "*.req" -print0 | xargs -0 -I file mv file ../ |
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
| sudo service ntp stop | |
| sudo ntpdate -s ntp.ubuntu.com | |
| sudo service ntp start |
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
| db.collection.aggregate( [ | |
| { $unwind : "$l" }, | |
| { $group : { _id : "$_id", len : { $sum : 1 } } }, | |
| { $sort : { len : -1 } }, | |
| { $limit : 25 } | |
| ] ) |
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
| finding in xml files | |
| aws s3 ls --recursive s3://bucket/ | awk '{print $4}' | grep '.xml' | xargs -I@ aws s3 cp s3://bucket/@ - | grep '35160561230314000507550020001107201294779231' | wc -l | |
| finding in gzip files!!! | |
| s3cmd ls --recursive s3://notafiscal-mailing/ | awk '{print $4}' | grep '.gz' | xargs -I@ s3cmd get @ - | zgrep 'request' | 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
| echo '{"id":"TEST","level2":{"id":"Level2 id"}}' | | nc -q0 stats 28777 LOGSTASH JSON | |
| nc localhost 5000 < /some/log/file.log | |
| echo "local.random.diceroll 4 `date +%s`" | nc -q0 stats 2003 GRAFITE | |
| echo "foo:1|c" | nc -u -w0 stats 8125 STATSD |
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
| db.getCollectionNames().forEach(function(collection) { | |
| var indexes = db.getCollection(collection).getIndexes(); | |
| indexes.forEach(function(c) { | |
| opt = '' | |
| ixkey = JSON.stringify(c.key, null, 1).replace(/(\r\n|\n|\r)/gm, "") | |
| ns = c.ns.substr(c.ns.indexOf(".") + 1, c.ns.length) | |
| for (var key in c) { | |
| if (key != 'key' && key != 'ns' && key != 'v') { | |
| if (opt != '') { | |
| opt += ',' |