I hereby claim:
- I am junaidk on github.
- I am junaidk (https://keybase.io/junaidk) on keybase.
- I have a public key whose fingerprint is A8C1 F384 12DE CDE6 A761 F837 279E 502A 669B DD2C
To claim this, I am signing this object:
package main | |
import ( | |
"cluster-manager/constants" | |
"crypto/tls" | |
"github.com/aws/aws-sdk-go/aws" | |
"github.com/aws/aws-sdk-go/aws/credentials" | |
"github.com/aws/aws-sdk-go/aws/session" | |
"github.com/aws/aws-sdk-go/service/s3" | |
"github.com/urfave/cli" |
srv1 = ssh -i key-file-path ubuntu@10.10.10.10 | |
srv2 = ssh -i key-file-path ubuntu@10.10.10.11 | |
srv3 = ssh -i key-file-path ubuntu@10.10.10.12 |
# install aws cli first and configure it with credentials and default region | |
# the script will iterate over all regions of AWS | |
for region in `aws ec2 describe-regions --output text | cut -f4` | |
do | |
echo -e "\nListing Instances in region:'$region'..." | |
aws ec2 describe-instances --query "Reservations[*].Instances[*].{IP:PublicIpAddress,ID:InstanceId,Type:InstanceType,State:State.Name,Name:Tags[0].Value}" --output=table --region $region | |
done |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
# show_wifi_clients.sh | |
# Shows MAC, IP address and any hostname info for all connected wifi devices | |
# written for openwrt 12.09 Attitude Adjustment | |
# modified by romano@rgtti.com from http://wiki.openwrt.org/doc/faq/faq.wireless#how.to.get.a.list.of.connected.clients | |
echo "# All connected wifi devices, with IP address," | |
echo "# hostname (if available), and MAC address." | |
printf "# %-20s %-30s %-20s\n" "IP address" "lease name" "MAC address" |
[Desktop Entry] | |
Type=Application | |
Terminal=false | |
Name=Intellij Idea | |
Icon= path to icon | |
Exec= path to .sh file | |
----------------- |
This are my cheat sheets that I have compiled over the years. Tired of searching Google for the same things, I started adding the information here. As time went on, this list has grown. I use this almost everyday and this Gist is the first bookmark on my list for quick and easy access.
I recommend that you compile your own list of cheat sheets as typing out the commands has been super helpful in allowing me to retain the information longer.
TxnID | UserID | TimeStampe | ItemID | Quantity | UnitPrice | |
---|---|---|---|---|---|---|
1 | 4122 | 17-09-2011 1:25 | 47 | 34 | 52.48 | |
2 | 273 | 17-09-2011 1:53 | 278 | 24 | 82.62 | |
3 | 3305 | 17-09-2011 1:55 | 183 | 50 | 52.49 | |
4 | 3561 | 17-09-2011 9:37 | 343 | 46 | 55.94 | |
5 | 1477 | 17-09-2011 10:07 | 313 | 44 | 56.19 | |
6 | 1850 | 17-09-2011 11:30 | 361 | 22 | 89.13 | |
7 | 1532 | 17-09-2011 11:48 | 304 | 22 | 78.63 | |
8 | 3055 | 17-09-2011 15:16 | 174 | 41 | 39.46 | |
9 | 1176 | 17-09-2011 17:40 | 130 | 32 | 73.18 |
# if number of occurrences of " , " is > 5 print the number | |
tr -d -c ',\n' < Users.csv | awk '{ if ( length >= 5) {print length;} }' | |
# if number of occurrences of " , " is > 5 print line number | |
tr -d -c ',\n' < Users.csv | awk '{ if ( length >= 5) {print NR;} }' | |
# read nth line from file | |
awk ' NR == 5' Users.csv |