I hereby claim:
- I am babo on github.
- I am babo (https://keybase.io/babo) on keybase.
- I have a public key whose fingerprint is B2E6 C087 42DB 7CFA CE5E 2454 5FBC 652F 9EA3 A514
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env perl | |
use Redis; | |
use CGI; | |
my $cgi = new CGI; | |
my $vars = $cgi->Vars; | |
my ($type,$nr) = ($vars->{type},$vars->{id}); | |
if ($nr > 0 && $type) { |
#!/usr/bin/env python3 | |
import redis | |
import pymysql | |
REDIS = 'redis.cache.amazonaws.com' | |
MYSQL = 'my.rds.amazonaws.com' | |
USER = 'whomai' | |
PASSWORD = 'SECRET' | |
DB = 'mdb' |
#!/usr/bin/env python | |
import argparse | |
import logging | |
try: | |
from urllib import splittype | |
except ImportError: | |
from urllib.parse import splittype | |
import boto3 |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"logs:CreateLogGroup", | |
"logs:CreateLogStream", | |
"logs:PutLogEvents" | |
], |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "Stmt1442914547000", | |
"Effect": "Allow", | |
"Action": [ | |
"s3:ListAllMyBuckets" | |
], | |
"Resource": [ |
#!/usr/bin/env python3 | |
import boto3 | |
def main(): | |
region_names = [x['RegionName'] for x in boto3.client('ec2').describe_regions()['Regions']] | |
for region_name in region_names: | |
ec2 = boto3.resource('ec2', region_name=region_name) | |
for sg in ec2.security_groups.iterator(): | |
print(region_name, 'security_group', sg.group_name, sg.group_id) | |
for instance in ec2.instances.iterator(): |
#!/usr/bin/env python3 | |
import json | |
import boto3 | |
def main(): | |
all_ec2 = {} | |
all_rds = {} | |
all_cache = {} | |
all_elb = {} |
<powershell> | |
Import-Module AWSPowerShell | |
Copy-S3Object -BucketName joc-internal-resources -Key installer/windows2012/run_userdata.ps1 -LocalFile "$env:temp\run_userdata.ps1" | |
Set-ExecutionPolicy -executionpolicy remotesigned -force | |
& "$env:temp\run_userdata.ps1" | |
</powershell> |
function SelectSubscription () { | |
$context=$null | |
try { | |
$context = Get-AzureRmContext | |
} catch [ System.Management.Automation.PSInvalidOperationException] {} | |
if ($context -eq $null) { | |
$context = (Login-AzureRmAccount).Context | |
} |