Skip to content

Instantly share code, notes, and snippets.

{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"ce:DescribeCostCategoryDefinition",
"ce:ListTagsForResource",
"ce:GetAnomalySubscriptions",
#!/usr/bin/env python
# vim:fileencoding=utf-8
import os
import requests
import datetime
import boto3
from dateutil.relativedelta import relativedelta
dt = datetime.datetime.now()
#!/bin/bash
if [ -z "${AWS_DEFAULT_PROFILE}" ]; then
export AWS_DEFAULT_PROFILE=default
fi
set -e
set -u
START_TIME=$(date -u +%Y-%m-%dT00:00:00Z -d "1 day ago")
curl -sfL https://api.github.com/repos/nestjs/nest/git/refs/tags/ | jq -r ".[].ref" | perl -nle "s/^refs\/tags\/// && print if /^refs\/tags\/(v\d{1,2}\.\d{1,2}\.\d{1,2})$/"
curl -sfL https://api.github.com/repos/vercel/next.js/git/refs/tags/ | jq -r ".[].ref" | perl -nle "s/^refs\/tags\/// && print if /^refs\/tags\/(v\d{1,2}\.\d{1,2}\.\d{1,2})$/"
curl -sfL https://www.openssl.org/source/ | perl -nle 'print $1 if /<a href=\"openssl\-(.*)\.tar\.gz\">.*/'
curl -sfL https://openresty.org/en/download.html |perl -nle 'print $1 if /<a href=\"https:\/\/openresty\.org\/download\/openresty\-(.*)\.tar\.gz\" .*>.*/' | sort -k1,1 -k2,2 -k3 -t"." -n
curl -sfL https://nodejs.org/download/release/ | perl -nle 'print $1 if /^<a href=\"(.*)\/\">.*/' | egrep "^v" | sed -e "s/^v//" | sort -k1,1 -k2,2 -k3 -t"." -n | perl -nlpe 's/^(.*)$/v$1/'
curl -sfL https://nginx.org/download/ | grep nginx | egrep -v "(patch|trace_process|.asc|.zip)" | perl -npe 's/^<a href=\"nginx\-(.*)\.tar\.gz\">.*/$1/' | sort -k1,1 -k2,2 -k3 -t"." -n
@holly
holly / lambda_console_login.py
Last active August 14, 2022 11:02
aws console login notification script
#!/usr/bin/env python
# vim:fileencoding=utf-8
""" [NAME] script or package easy description
[DESCRIPTION] script or package description
"""
import os, sys, io
import json
from pyline_notify import PyLINENotify