I hereby claim:
- I am philroche on github.
- I am philroche (https://keybase.io/philroche) on keybase.
- I have a public key whose fingerprint is 77BB A519 ABC5 FDE7 ED9D 30AA 50DC BC7C 3339 F00F
To claim this, I am signing this object:
#!/bin/bash | |
## Pass local .tar.gz path as first argument | |
# Update the following variables | |
# This will be created if it does not exist | |
ACCOUNT_NAME="philrocheubuntu" | |
# This will be created if it does not exist | |
CONTAINER="philrocheubuntuimages" | |
# Customize this as all vm resouces with this group will be cleaned up. This will be created if it does not exist |
#!/usr/bin/env python3 | |
"""Generate a presigned URL to download an S3 object | |
<cmd> bucket_name key_name [expiration_days]""" | |
import sys | |
import boto3 | |
from botocore.client import Config |
#!/bin/bash | |
# | |
# Change this to specify a different handbrake preset. You can list them by running: "HandBrakeCLI --preset-list" | |
# | |
#set -ux | |
set +e | |
PRESET="Very Fast 720p30" # or Fast 720p30 or Fast 1080p30 | |
if [ -z "$1" ] ; then | |
TRANSCODEDIR="." | |
else |
I hereby claim:
To claim this, I am signing this object:
javascript:(function()%7Bfunction%20callback()%7B(function(%24)%7Bvar%20jQuery%3D%24%3Bfunction%20callback()%7Bfunction%20getParameterByName(name%2C%20url)%20%7Bif%20(!url)%20url%20%3D%20window.location.href%3Bname%20%3D%20name.replace(%2F%5B%5C%5B%5C%5D%5D%2Fg%2C%20'%5C%5C%24%26')%3Bvar%20regex%20%3D%20new%20RegExp('%5B%3F%26%5D'%20%2B%20name%20%2B%20'(%3D(%5B%5E%26%23%5D*)%7C%26%7C%23%7C%24)')%2Cresults%20%3D%20regex.exec(url)%3Bif%20(!results)%20return%20null%3Bif%20(!results%5B2%5D)%20return%20''%3Breturn%20decodeURIComponent(results%5B2%5D.replace(%2F%5C%2B%2Fg%2C%20'%20'))%3B%7Dvar%20video_embed_url%20%3D%20getParameterByName(%22pid%22%2C%20%24(%22%23playerpdk%22).attr(%22src%22))%3Bvar%20auth_cookie%20%3D%20Cookies.get('mpx_token')%3Bvar%20auth_video_embed_url%20%3D%20video_embed_url%20%2B%20'%3Fauth%3D'%20%2B%20auth_cookie%20%2B'%26formats%3Dmpeg-dash%26format%3DSMIL%26embedded%3Dtrue%26tracking%3Dtrue'%3Bconsole.log(auth_video_embed_url)%3Bprompt(%22Video%20embed%20URL%20for%20use%20with%20https%3A%2 |
#!/bin/bash -e | |
## Launch the latest daily Ubuntu in AWS, optionally with user-data | |
## provided in a file and tagged with a name | |
function usage() { | |
echo "$0: [-r region] [-V ubuntu_version] [-i instance_type] \\" | |
echo " [-u user_data_file] [-n instance_name] [-d disk_size] \\" | |
echo " [-D] to disable termination via the API" | |
echo " [-I] iam instance profile [-a AMI ID]" | |
echo " [-P profile] aws cli profile" |
{ | |
"cap_add" : null, | |
"cap_drop" : null, | |
"cmd" : "dumb-init /etc/openvpn/start.sh", | |
"cpu_priority" : 50, | |
"devices" : null, | |
"enable_publish_all_ports" : false, | |
"enable_restart_policy" : false, | |
"enabled" : false, | |
"env_variables" : [ |
function cloneinstance { | |
awsinstanceid=$1 | |
region=${2:-us-east-1} | |
awsprofile=${3:-seg} | |
export AWS_DEFAULT_REGION=$region | |
dt=$(date '+%Y%m%d%H%M%S') | |
ami=$(aws --profile=${awsprofile} ec2 describe-instances --instance-ids $awsinstanceid --query 'Reservations[].Instances[].ImageId' --output=text) | |
privatekey=$(aws --profile=${awsprofile} ec2 describe-instances --instance-ids $awsinstanceid --query 'Reservations[].Instances[].KeyName' --output=text) | |
securitygroup=$(aws --profile=${awsprofile} ec2 describe-instances --instance-ids $awsinstanceid --query 'Reservations[].Instances[].NetworkInterfaces[].Groups[].GroupId' --output=text) | |
instancetype=$(aws --profile=${awsprofile} ec2 describe-instances --instance-ids $awsinstanceid --query 'Reservations[].Instances[].InstanceType' --output=text) |
#!/bin/bash | |
VERBOSITY=0 | |
TEMP_D="" | |
FORMATS=( | |
qcow2 | |
qcow2-compressed | |
raw | |
azure | |
azure-dynamic | |
azure-fixed |
""" | |
Play with AWS EC2 describe_instance_types | |
""" | |
from boto3.session import Session | |
sess = Session() | |
ec2c = sess.client('ec2') | |
resp = ec2c.describe_instance_types() |