Skip to content

Instantly share code, notes, and snippets.

View cfbarbero's full-sized avatar

Cris Barbero cfbarbero

View GitHub Profile

Heap Allocation

\[Eden\:\s(?<EdenUsedBeforeGC>\d*\.?\d*)M\((?<EdenCapacityBeforeGC>\d*\.?\d*)\M\)->(?<EdenUsedAfterGC>\d*\.?\d*)\w\((?<EdenCapacityAfterGC>\d*\.?\d*)\M\)\s.*Heap\:\s(?<HeapUsedBeforeGC>\d*\.?\d*)M\((?<HeapCapacityBeforeGC>\d*\.?\d*)G\)->(?<HeapUsedAfterGC>\d*\.?\d*)M\((?<HeapCapacityAfterGC>\d*\.?\d*)G\)]

Times

\[Times:\suser=(?<GCUserTime>\d*\.?\d*)\ssys=(?<GCSysTime>\d*\.?\d*),\sreal=(?<GCRealTime>\d*\.?\d*)\ssecs] 
7zip 16.04
7zip.commandline 16.02.0.20170209
7zip.install 16.04
7zip.portable 16.04
autohotkey.portable 1.1.26.01
awscli 1.11.61
baretail 3.50.0.20120226
chocolatey 0.10.3
chocolatey-core.extension 1.3.3
DotNet4.0 4.0.30319.20141222
# 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
list-stack-outputs = aws cloudformation describe-stacks --stack-name ${1} --query "Stacks[*][StackName,Outputs]"; f
# 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
@cfbarbero
cfbarbero / aws cli queries.md
Last active July 20, 2022 03:56
AWS CLI query examples

search sns subscriptions by endpoint

aws sns list-subscriptions --query 'Subscriptions[?contains(Endpoint,`dev`) == \`true\` ][Endpoint, TopicArn]' --output table

search alarms by sns topic

aws cloudwatch describe-alarms --query 'MetricAlarms[?contains(AlarmActions, `something`) == `true`][AlarmName, AlarmActions]' --output table --max-items 10

Get stack outputs

aws cloudformation describe-stacks --query 'Stacks[0].Outputs' --output table --stack-name $stackname --profile $profile

Get stack outputs from multiple stacks

@cfbarbero
cfbarbero / setuptools-tips.md
Last active October 30, 2018 19:19
SetupTools Tips
# 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

Multiline yaml sub

      DestinationPolicy: 
        Fn::Sub:
          - |
            {
                "Version" : "2012-10-17",
                "Statement" : [
                    {
                    "Sid" : "",