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
import uuid | |
from .some_object import SomeObject | |
class some_lambda: | |
def __init__(self): | |
self.instance_id = uuid.uuid4() | |
self.someobject = SomeObject() |
- (sysstat)[https://github.com/sysstat/sysstat]
# List indexes
| REST /services/data/indexes | table title, totalEventCount, currentDBSizeMB
# Count events per index
| eventcount summarize=false index=* report_size=true
# Metadata about an index
| metadata index="main" type=hosts
$pip install -e .[development]
# from setuptools.py
setup(
extras_require = dict(
aws sns list-subscriptions --query 'Subscriptions[?contains(Endpoint,`dev`) == \`true\` ][Endpoint, TopicArn]' --output table
aws cloudwatch describe-alarms --query 'MetricAlarms[?contains(AlarmActions, `something`) == `true`][AlarmName, AlarmActions]' --output table --max-items 10
aws cloudformation describe-stacks --query 'Stacks[0].Outputs' --output table --stack-name $stackname --profile $profile
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
# Install | |
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | |
sudo yum install stress -y | |
# Run CPU | |
stress-ng --cpu 4 --timeout 10m --metrics-brief |
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
list-stack-outputs = aws cloudformation describe-stacks --stack-name ${1} --query "Stacks[*][StackName,Outputs]"; f |
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
# Next time you need to install something with python setup.py -- which should be never but things happen. | |
python setup.py install --record files.txt | |
# This will cause all the installed files to be printed to that directory. | |
# Then when you want to uninstall it simply run; be careful with the 'sudo' | |
cat files.txt | xargs sudo rm -rf |