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
| 046588baa88c67ee2a59154f5428ff3717cca9361d9e0973e21b5b063591d60b3a69be8827bdf8dc4a76d955605e8c5e77ff2e6b482da20615109a25d74320ece2 |
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
| filebeat.prospectors: | |
| - input_type: log | |
| paths: | |
| - /mnt/log/*.log | |
| processors: | |
| - add_cloud_metadata: | |
| output.elasticsearch: | |
| hosts: ['elasticsearch:9200'] |
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 daysInMonth(month, year){ | |
| return new Date(year, month, 0).getDate(); | |
| } | |
| function estimate(current){ | |
| d = new Date(); | |
| n = d.getDate(); | |
| h = d.getHours(); | |
| y = d.getFullYear(); | |
| m = d.getMonth() + 1; |
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 marathon.json deploys cadvisor to each node and exposes it on port 3002. | |
| cadvisor/marathon.json | |
| { | |
| "id": "cadvisor", | |
| "cpus": 0.1, | |
| "mem": 100, | |
| "disk": 0, | |
| "instances": 8, // equal to number of agent nodes you have | |
| "constraints": [["hostname", "UNIQUE"]], |
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
| Elastic.co's past-releases section of their website is unuseable. | |
| I wrote this script to parse all the pages of that site and just spit out all the links | |
| so you can just search for what you want. | |
| Isn't it ironic not being able to search for something on elasticsearch's website? | |
| #!/usr/bin/env python | |
| import requests | |
| import re |
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
| #!/usr/bin/env python | |
| # @charlesmims 2015 | |
| # Maintains a number of coreOS hosts running in ec2. Can be used to scale up by increasing NUM_NODES, | |
| # but in present state will not scale down cleanly. | |
| import boto.ec2 | |
| import time | |
| from os import environ | |
| from collections import defaultdict |
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
| Add the following to your ~/.bashrc and your bash history will be saved to a coherent, time-stamped, persistant history file. | |
| shopt -s histappend | |
| export HISTIGNORE=ignoreboth | |
| export HISTFILESIZ=1000000 | |
| export HISTSIZE=1000000 | |
| export HISTTIMEFORMAT='%F %T ' | |
| export PROMPT_COMMAND='history -a' | |
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
| #!/usr/bin/env python | |
| """ | |
| Bytes-to-human / human-to-bytes converter. | |
| Based on: http://goo.gl/kTQMs | |
| Working with Python 2.x and 3.x. | |
| Author: Giampaolo Rodola' <g.rodola [AT] gmail [DOT] com> | |
| License: MIT | |
| """ |
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
| #!/usr/bin/env python | |
| # make this file executable and save it in /usr/local/bin/. | |
| # pipe gpg ascii-armored code to it to strip it into a simple string | |
| # pipe the simple string to it to get the original formatting back which | |
| # you can pipe into gpg. | |
| import fileinput | |
| message = '' |
NewerOlder