Skip to content

Instantly share code, notes, and snippets.

View manuasir's full-sized avatar
:shipit:
Focusing

Manuel J. Bernal manuasir

:shipit:
Focusing
View GitHub Profile
@manuasir
manuasir / centos_AMIs.sh
Created January 3, 2020 02:42
One-liner to obtain a list of Centos 7 AMIs from all regions
for region in eu-west-3 ap-northeast-1 ap-northeast-2 ap-southeast-1 ap-southeast-2 ap-south-1 sa-east-1 us-east-1 us-east-2 us-west-1 us-west-2 ca-central-1 eu-west-1 eu-west-2 eu-west-3 ap-northeast-1 ap-northeast-2 ap-southeast-2 ap-southeast-2 ap-south-1 sa-east-1; do echo $region ;aws --region $region ec2 describe-images --owners aws-marketplace --filters Name=product-code,Values=aw0evgkw8e5c1q413zgy5pjce | grep ImageId; done

Keybase proof

I hereby claim:

  • I am manuasir on github.
  • I am manuasir (https://keybase.io/manuasir) on keybase.
  • I have a public key ASC6wdqBnaXstErTj6Ktm9BzzVmRKn5lAZcJ-xotuCZYDQo

To claim this, I am signing this object:

@manuasir
manuasir / restore_ubuntu_gpg_keys.sh
Created September 13, 2018 18:59
Restore ubuntu GPG repository keys. Fix to "Failed to fetch. The following signatures couldn't be verified because the public key is not available: NO_PUBKEY"
# Receives the HEX Pubkey returned in the error
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys
# Make sure to use your hexadecimal:
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6D975C4791E7EE5E
@manuasir
manuasir / alert_http.py
Last active August 27, 2018 16:28
Splunk alert performs POST request from a search result field
# Place this script into $SPLUNK_HOME/bin/scripts/ and configure the alert in 'Search and Reporting' Splunk Web section.
import os
import sys
import requests
import gzip
import csv
import json
def openany(p):