Author:
erics , September 13th, 2023
Add inbound rule(s) for a security group ID:
shell > aws ec2 authorize - security - group - ingress -- group - id sg - NNNNNNNN -- protocol tcp -- port 80 -- cidr '0.0.0.0/0'
## Delete inbound rule(s) for a security group ID
shell > aws ec2 revoke - security - group - ingress -- group - id sg - NNNNNNNN -- protocol tcp -- port 80 -- cidr '0.0.0.0/0'
## List security groups by security group ID
shell > aws ec2 describe - security - groups -- output json | jq - r '.SecurityGroups[]|.GroupId+" "+.GroupName'
## List inbound rules for a specific security group ID
shell > aws ec2 describe - security - groups -- group - ids sg - NNNNNNNN -- output json | jq - r '.SecurityGroups[].IpPermissions[]|. as $parent|(.IpRanges[].CidrIp+" "+($parent.ToPort|tostring))'
Thanks to: https://www.bluematador.com/learn/aws-cli-cheatsheet
Categories: How-To's , Technology Tags: Add , AWS , aws cli , cli , Delete , Group , howto , Remove , security , Security Group , tips
| No comments
Author:
erics , November 24th, 2022
PROBLEM: Unable to sign out of iCloud on OSX Yosemite or disable Keychain SOLUTION: Delete the following, then reboot:
~ / Library / Application Support / iCloud /
~ / Library / Preferences / Mobile* . plist
Categories: Technology Tags: 10.10.5 , Delete , Error , howto , iCloud , Library , macosx , OSX , plist , Preferences , Remove , tips , Yosemite
| No comments
Author:
erics , July 29th, 2021
SUMMARY: Needed to create an AWS IAM Policy to allow a user access to create and delete EBS snapshots. This script also needed to be able to list volumes:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
"Version" : "2012-10-17" ,
"Statement" : [
{
"Sid" : "VisualEditor0" ,
"Effect" : "Allow" ,
"Action" : [
"ec2:DeleteSnapshot" ,
"ec2:ModifySnapshotAttribute" ,
"ec2:CreateSnapshots" ,
"ec2:ResetSnapshotAttribute" ,
"ec2:CreateSnapshot"
] ,
"Resource" : [
"arn:aws:ec2:*:ACCOUNT_ID_HERE:volume/*" ,
"arn:aws:ec2:*:ACCOUNT_ID_HERE:snapshot/*" ,
"arn:aws:ec2:*:ACCOUNT_ID_HERE:instance/*"
]
} ,
{
"Sid" : "VisualEditor1" ,
"Effect" : "Allow" ,
"Action" : [
"ec2:DescribeSnapshotAttribute" ,
"ec2:DescribeVolumes" ,
"ec2:DescribeSnapshots"
] ,
"Resource" : "*"
}
]
}
Categories: How-To's , Technology Tags: Amazon , AWS , Create , Delete , howto , IAM , JSON , Policy , Snapshot , tips , User , volume
| No comments
Author:
erics , May 7th, 2020
I wanted to empty the time series data cache from the Prometheus server to start clean. The best practice is to use the administrative HTTP API via curl. For example, to clear all data for job mysqld as defined in the prometheus.yml configuration file:
curl - X POST - g 'http://localhost:9090/api/v1/admin/tsdb/delete_series?match[]={job="mysqld"}'
If you want to delete ALL data from Prometheus, then […]
Categories: How-To's , Technology Tags: Cache , Clear , Curl , Delete , Empty , howto , Prom , Prometheus , Remove , tips
| No comments
Author:
erics , March 27th, 2020
Quit Skype From your Applications folder, drag the Skype icon into the Trash In the top Finder menu, select Go -> Go to Folder… or press Shift-Command-G to bring up the “Go to the folder” prompt Open ~/Library/Application Support and drag “Skype Helper” to the Trash Open ~/Library/Application Support/Microsoft and drag “Skype for Desktop” to […]
Categories: How-To's , Technology Tags: apple , Delete , delete skype , howto , MacOS , Remove , remove skype , Skype , skype for mac , tips
| No comments
Author:
erics , March 23rd, 2020
Using PERL, we can easily do a search and replace across multiple files. perl -ni -w -e ‘print unless m/^gdb\d+/;’ yourFileSpec
Categories: How-To's , Technology Tags: Batch , Delete , Edit , Edit In Place , howto , in place , perl , search , tips
| No comments
Author:
erics , November 24th, 2019
xattr -r -d com.apple.quarantine {dirname} ~or~ xattr -r -d com.apple.quarantine *
Categories: How-To's , Technology Tags: apple , attr , Attribute , Change , com.apple.quarantine , comacast , Delete , directory , howto , MacOS , macosx , Quarantine , Remove , Terminal , tips , Tree , xattr
| No comments
Author:
erics , September 14th, 2017
root@outbound:/var/log # postqueue -p -Queue ID- –Size– —-Arrival Time—- -Sender/Recipient——- 593E2FC69D 3970 Tue Sep 12 23:15:36 MAILER-DAEMON (connect to yourDomain.com[10.10.10.10]:25: Connection timed out) yourUser@yourDomain.com — 4 Kbytes in 1 Request. root@outbound:/var/log # postsuper -d 593E2FC69D postsuper: 593E2FC69D: removed postsuper: Deleted: 1 message root@outbound:/var/log # postqueue -p Mail queue is empty
Categories: How-To's , Technology Tags: Delete , Email , howto , PostFix , postqueue , postsuper , Queue , tips
| No comments
Author:
erics , June 19th, 2014
Categories: How-To's , Technology Tags: Blank , Blank Lines , Delete , Delete Blank Lines , howto , tips , vi , vim
| No comments
Author:
erics , August 22nd, 2013
In Terminal:
sudo mv / Library / Preferences / SystemConfiguration / com . apple . network . eapolclient . configuration . plist / Library / Preferences / SystemConfiguration / com . apple . network . eapolclient . configuration . plist . good
Then reboot. YMMV… This is why I am so upset with Apple these days – they constantly “dumb-down” MacOSX, removing features to “protect” the innocent public from harming themselves with the click of a mouse. Perfectly reasonable advanced features that existed in 10.6.8 are no-where to be found in 10.7 Lion (bad) […]
Categories: How-To's , Technology Tags: 802.1X , Delete , howto , Lion , macosx , OSX , Profile , Remove , tips
| 1 comment