Skip to content

Instantly share code, notes, and snippets.

View Rumbles's full-sized avatar
🍊

James Stocker Rumbles

🍊
View GitHub Profile
@Rumbles
Rumbles / gist:13ae1a6d6848c4493511
Last active August 29, 2015 14:26
While loop that prompts for input until an integer is entered
#This part works, it prompts the user for input, and doesn't stop prompting until there is a valid string
while [ -z "$description" ]; do
echo -n "Please enter a description for use in the config file: "
read description
done
#This part doesn't work, it continues to prompt whether there is a valid integer or not
while ! [[ $listID =~ '^[0-9]+$' ]]; do
echo -n "Please enter the list ID: "
read $listID
@Rumbles
Rumbles / gist:b5a7eaf8a67c9de18223
Created August 6, 2015 15:33
read breaks when $description has a space in the string
while true; do
read -p "Please confirm you are happy with the following: Description \""$description"\", Groupd ID: \""$groupID"\", List ID: \""$listID"\", Phone Number: \""$phone_number"\". Please enter Y/N: " yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit 1;;
* ) echo "Please enter Yes or No";;
esac
done
@Rumbles
Rumbles / virt-top
Created May 23, 2016 10:54
virt-top output
virt-top 11:52:47 - x86_64 24/24CPU 2199MHz 96639MB 12.1% 7.6% 1.4% 6.7% 7.4% 10.5% 7.5% 8.8% 3.6% 3.6% 6.5%
3 domains, 3 active, 3 running, 0 sleeping, 0 paused, 0 inactive D:0 O:0 X:0
CPU: 5.2% Mem: 92160 MB (92160 MB by guests)
ID S RDRQ WRRQ RXBY TXBY %CPU %MEM TIME NAME
3 R 0 14 10M 141K 4.6 84.0 81:56:23 bamboo.domain.com
4 R 0 0 9241 5845 0.3 4.0 33:11:02 bitbucket.domain.com
2 R 0 92 4428 0 0.3 6.0 382:14.07 jira.domain.com
2016-06-14 07:47:08,222[WARN ][indices.cluster ] [es-node1.domain.net] [[logstash-2016.06.06][0]] marking and sending shard failed due to [failed recovery]
RecoveryFailedException[[logstash-2016.06.06][0]: Recovery failed from {es-node3.domain.net}{txgFrR-HRKKdeGoDI1ADCA}{10.0.2.85}{10.0.2.85:9300}{max_local_storage_nodes=1} into {es-node1.domain.net}{K-E-FJorRWKmexZGGEp45g}{10.0.0.45}{10.0.0.45:9300}{max_local_storage_nodes=1} (no activity after [30m])]; nested: ElasticsearchTimeoutException[no activity after [30m]];
at org.elasticsearch.indices.recovery.RecoveriesCollection$RecoveryMonitor.doRun(RecoveriesCollection.java:236)
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: ElasticsearchTimeoutException[
2022-06-29T08:49:57.214Z [ERROR] policy_manager.policy_handler: timeout: failed to read policy in time: policy_id=1a9ab501-245a-f40a-9904-40a8f2c7dce2
SIGABRT: abort
PC=0x46aac1 m=0 sigcode=0
goroutine 0 [idle]:
runtime.futex()
/usr/local/go/src/runtime/sys_linux_amd64.s:519 +0x21
runtime.futexsleep(0x13a, 0x2561be0, 0xc00004c800)
/usr/local/go/src/runtime/os_linux.go:44 +0x36
runtime.notesleep(0x2561d30)
https://us-east-1.console.aws.amazon.com/cost-management/home?region=us-east-1#/cost-explorer?chartStyle=STACK&costAggregate=unBlendedCost&endDate=2024-01-19&excludeForecasting=false&filter=%5B%7B%22dimension%22:%7B%22id%22:%22TagKey%22,%22displayValue%22:%22Tag%22%7D,%22operator%22:%22INCLUDES%22,%22values%22:%5B%7B%22value%22:%22vzw-emr-Delete%20partitions_dag%22,%22displayValue%22:%22vzw-emr-Delete%20partitions_dag%22%7D,%7B%22value%22:%22vzw-emr-MCR_dag%22,%22displayValue%22:%22vzw-emr-MCR_dag%22%7D,%7B%22value%22:%22vzw-emr-TEST_account_info_dag%22,%22displayValue%22:%22vzw-emr-TEST_account_info_dag%22%7D,%7B%22value%22:%22vzw-emr-Vacuum%20partitions%20Test_dag%22,%22displayValue%22:%22vzw-emr-Vacuum%20partitions%20Test_dag%22%7D,%7B%22value%22:%22vzw-emr-Vacuum%20partitions_dag%22,%22displayValue%22:%22vzw-emr-Vacuum%20partitions_dag%22%7D,%7B%22value%22:%22vzw-emr-Vacuum%20regreshes_dag%22,%22displayValue%22:%22vzw-emr-Vacuum%20regreshes_dag%22%7D,%7B%22value%22:%22vzw-emr-account_info_dag%22,%22displa