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 ruby | |
| # frozen_string_literal: true | |
| # 256-color hex interpretation for terminal colorization | |
| # | |
| # Usage | |
| # "text".color256(foreground, background) | |
| # | |
| # print "Colorize this".color256('#f7921e', '#666') |
1 shard, 0 replica.
Update default template:
curl -X PUT http://localhost:9200/_template/default -H 'Content-Type: application/json' -d '{"index_patterns": ["*"],"order": -1,"settings": {"number_of_shards": "1","number_of_replicas": "0"}}'
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 -XGET 'localhost:9200/_cat/recovery?v' | |
| curl -XPUT localhost:9200/_cluster/settings -d '{ | |
| "persistent" : { | |
| "cluster.routing.allocation.node_concurrent_recoveries" : "10", | |
| "indices.recovery.max_bytes_per_sec": "250mb", | |
| "indices.recovery.concurrent_streams": 10 | |
| } | |
| }' | |
| curl -s -XGET 'localhost:9200/_cat/recovery?v' |
You can use ssacli (smart storage administrator command line interface) tool to manage any of supported HP Smart Array Controllers in your Proxmox host without need to reboot your server to access Smart Storage Administrator in BIOS. That means no host downtime when managing your storage.
CLI is not as convenient as GUI interface provided by BIOS or desktop utilities, but still allows you to fully manage your controller, physical disks and logical drives on the fly with no Proxmox host downtime.
ssacli replaces older hpssacli, but shares the same syntax and adds support for newer servers and controllers.
(still a work-in-progress)
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/local/bin/ruby | |
| require 'rubygems' | |
| require 'chef/data_bag' | |
| require 'chef/data_bag_item' | |
| Chef::Config.from_file(File.join(ENV['HOME'], '.chef', 'knife.rb')) | |
| puts "Usage: bagger <bag> <source_file>" unless ARGV[0] && ARGV[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
| #!/bin/bash | |
| # Common functions | |
| function log_prefix { date +%Y-%m-%d\ %H:%M:%S; } | |
| function info { echo "[$(log_prefix)] Info: ${1}"; } | |
| function error { >&2 echo "[$(log_prefix)] Error: ${1}"; } | |
| function fatal { >&2 echo "[$(log_prefix)] Fatal: ${1}"; exit ${2:1}; } | |
| # Detect if we're on OS-X | |
| if [[ "${OSTYPE}" != darwin* ]]; then |
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 bash | |
| set -Eeuo pipefail | |
| trap cleanup SIGINT SIGTERM ERR EXIT | |
| script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
| usage() { | |
| cat <<EOF | |
| Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |