Skip to content

Instantly share code, notes, and snippets.

View Rohja's full-sized avatar
🏡

Paul "Rohja" LESELLIER Rohja

🏡
View GitHub Profile
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowViewAccountInfo",
"Effect": "Allow",
"Action": [
"iam:ListVirtualMFADevices",
"iam:GetAccountPasswordPolicy"
],
<script type="text/html" settings>
<div class="padding npb">
<div class="m" data-jc="textbox" data-jc-path="image_url" data-jc-config="required:true;icon:envelope">Image URL</div>
</div>
</script>
<script>
// {String}, IMPORTANT (lower case without diacritics)
exports.name = 'imagedisplay';
@Rohja
Rohja / kubernetes_dump_all_in_namespace.sh
Created November 24, 2017 09:46
Dump all the yaml files (deployments,job,pvc,etc.) from a Kubernetes Namespace
#!/bin/bash
NAMESPACE=$1
if [ -z $1 ]; then
NAMESPACE="default"
exit 1
fi
echo "Using namespace \"${NAMESPACE}\"."
@Rohja
Rohja / AutoDNSLambda.py
Last active February 1, 2018 13:07
Create DNS Record in zone on new EC2 Instance creation
#
# ------------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# <rohja@rohja.com> wrote this file. As long as you retain this notice you can
# do whatever you want with this stuff. If we meet some day, and you think this
# stuff is worth it, you can buy me a beer in return. Paul "Rohja" Lesellier
# ------------------------------------------------------------------------------
#
import json
@Rohja
Rohja / graphene-boto3-ecs.py
Created September 30, 2016 12:32
A simple GraphQL test - Query ECS informations from AWS API
import graphene
import boto3
class Cluster(graphene.ObjectType):
arn = graphene.String(description='Cluster ARN')
name = graphene.String(description='Cluster Name')
status = graphene.String(description='Cluster Status')
registeredContainerInstancesCount = graphene.Int(description='Container Instances Count')
runningTasksCount = graphene.Int(description='Running Tasks Count')