Author:
erics , February 11th, 2025
How To Add and Associate a New AWS Elastic IP (EIP) Address Via the Command Line (CLI):
shell % aws ec2 allocate - address -- domain vpc
eipalloc - 9c09b9effc6b96a98 vpc us - east - 1 34.99.141.8 amazon
shell % aws ec2 associate - address -- allocation - id eipalloc - 9c09b9effc6b96a98 -- instance - id i - 024f1deafa1e2d453
eipassoc - 0216d3f7231147aed
Categories: How-To's , Technology Tags: Address , Allocate , allocate-address , Associate , associate-address , AWS , cli , Command line , EC2 , eip , Elastic , Elastic IP , howto , Instance , Instance ID , Network , tips , VPC
| No comments
Author:
erics , February 8th, 2025
If you’re using macOS 14.7.3 and experiencing an annoying issue where clicking a running app’s icon in the Dock doesn’t immediately make it active for typing, you’re not alone. Instead of the expected behavior—where the app comes to the forefront, ready for interaction—you might find yourself having to click inside the app’s window before you […]
Categories: Technology Tags: 14.7.3 , cli , click , defaults , defaults write , Disable , Focus , howto , MacOS , mode , Mouse , single-app , Terminal , tips , write
| No comments
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 , May 23rd, 2023
In the macOS Terminal, my mouse scroll wheel would magically start scrolling the command line history instead of the window buffer scroll bar on the right to show window history. This happened when an SSH session was disconnected or timed out. The fix is to run the reset command.
Categories: How-To's , Technology Tags: apple , bash , cli , Command line , Disconnect , History , howto , MacOS , Mouse , Scroll , Shell , ssh , Terminal , Timeout , tips
| No comments
Author:
erics , September 1st, 2021
There are three commands in Linux to easily get a reverse DNS lookup with: dig, host and nslookup. Here are examples of each: shell> dig -x 3.214.2.238 +short
shell> dig -x 3.214.2.238
; << >> DiG 9.8.2rc1 - RedHat - 9.8.2 - 0.68.rc1.86.amzn1 << >> - x 3.214.2.238
; ; global options : + cmd
; ; Got answer :
; ; -> > HEADER << - opcode : QUERY , status : NOERROR , id : 19300
; ; flags : qr rd ra ; QUERY : 1 , ANSWER : 1 , AUTHORITY : 0 , ADDITIONAL : 0
; ; QUESTION SECTION :
; 238.2.214.3.in - addr . arpa . IN PTR
; ; ANSWER SECTION :
238.2.214.3.in - addr . arpa . 300 IN PTR ns3 . wyzaerd . info .
; ; Query time : 8 msec
; ; SERVER : 10.0.0.2 #53(10.0.0.2)
; ; WHEN : Wed Sep 1 19 : 43 : 56 2021
; ; MSG SIZE rcvd : 72
shell> host 3.214.2.238
238.2.214.3.in - addr . arpa domain name pointer ns3 . wyzaerd . info .
shell> nslookup 3.214.2.238
Server : 10.0.0.2
Address : 10.0.0.2 #53
Non - authoritative answer :
238.2.214.3.in - addr . arpa name = ns3 . wyzaerd . info .
Categories: How-To's , Technology Tags: cli , Command , Command line , dig , dig -x , DNS , Host , howto , lookup , nslookup , Reverse , Reverse DNS , tips
| No comments
Author:
erics , July 29th, 2021
I was getting error “You must specify a region” when running any aws CLI command. The fix: Using the aws command:
aws configure set region us - east - 1 -- profile demo
which will automatically add the following to the file ~/.aws/config:
[ profile demo ]
region = us - east - 1
You many simply edit the ~/.aws/config file yourself and append the same thing:
vi ~ / . aws / config
[ profile demo ]
region = us - east - 1
Categories: How-To's , Technology Tags: AWS , aws cli , aws command , aws configure , aws set , cli , Command , Config , configure , Error , Region , You must specify a region
| No comments
Author:
erics , May 26th, 2021
mysql - N - B - e 'show variables like "%datadir%";'
-N: No column headers -B: Batch mode – use tabs as field separators https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-output-formats.html Multiple Formats Available: Table Format – use –result-format=table, alias –table Tab Separated Format – use –result-format=tabbed, alias –tabbed Vertical Format – use –result-format=vertical, alias –vertical JSON Format Output – use –result-format=VALUE, alias –json[=pretty|raw|off] VALUE may be one of: json or […]
Categories: How-To's , Technology Tags: --tabbed , cli , Format , mysql , output , Plain , Table , Vertical
| No comments
Author:
erics , December 3rd, 2020
Problem While running the aws cli command from a Perl async command inside apid, I go the following error:
IOError : [ Errno 10 ] No child processes
Solution The issue turned out to be a bug in Python2.7, so I upgraded to Python3.4, then uninstalled and re-installed the aws cli software so that it used the proper Python34 version. Procedure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
sudo - i
cd
## Upgrade Python
yum install python34
alternatives -- config python
## "Uninstall" old aws cli
mv / opt / aws / opt / aws . fcs
cd / usr / bin /
mv aws aws . fcs
mv aws_completer aws_completer . fcs
## Install new aws cli
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" - o "awscliv2.zip"
unzip awscliv2 . zip
. / aws / install - i / opt / aws - b / usr / bin
/ usr / bin / aws -- version
https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html […]
Categories: How-To's , Technology Tags: alternatives , API , apid , AWS , aws cli , AWS Linux , Broken , cli , Cloudformation , Command , Curl , Error , Exec , Execute , howto , IOError , Linux , No child processes , perl , Python , Python27 , Python34 , tips , Yum
| No comments
Author:
erics , November 2nd, 2020
clear ; printf '\e[3J' && log show -- predicate 'subsystem == "com.apple.TimeMachine"' -- info -- last 24h | grep - F 'eMac' | grep - Fv 'etat' | awk - F ']' '{print substr($0,1,19), $NF}'
Categories: How-To's , Technology Tags: cli , Extract , howto , Log , Logs , Script , Shell , Terminal , Time Machine , tips , view
| No comments
Author:
erics , January 30th, 2020
Recently, I wanted to see the “origin” of the git repository I was working in. The command is: git remote -v For example:
theUser @ theHost $ git remote - v
origin git @ localhost : / volumes / data / git / thePlugin . git ( fetch )
origin git @ localhost : / volumes / data / git / thePlugin . git ( push )
Categories: How-To's , Technology Tags: cli , Command , Display , git , git remote , howto , Linux , Show , tips
| No comments