(note: replace ORGANIZATION
and PROJECT
)
git clone git clone git@github.com:ORGANIZATION/PROJECT.git my-repository
// -*- coding:utf-8-unix; mode:c; -*- | |
// | |
// get the active window on X window system | |
// | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <locale.h> | |
#include <X11/Xlib.h> // `apt-get install libx11-dev` |
This gist contains lists of modules available in
in AWS Lambda.
#!/bin/bash | |
# allow settings to be updated via environment | |
: "${xvfb_lockdir:=$HOME/.xvfb-locks}" | |
: "${xvfb_display_min:=99}" | |
: "${xvfb_display_max:=599}" | |
mkdir -p -- "$xvfb_lockdir" || exit |
This script can help you find and remove unused AWS snapshots and volumes.
There is hardcoded list of regions that it searches, adjust the value to suit your needs.
Use snapshot.py snapshot-report
to generate report.csv
containing information about all snapshots.
snapshot.py snapshot-cleanup
lets you interactively delete snapshot if it finds it is referencing unexisting resources.
./snapshots.py --help
import java.util.LinkedList; | |
import java.util.List; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
/** | |
* | |
* @author michel | |
*/ | |
public class NewMain { |
Protect container instance with containers running from scale-in. Uses aws-cli set-instance-protection. Inspired by: https://stackoverflow.com/questions/45020323/ecs-asg-scaling-down-policy-recommendations
Ignores ecs-agent and dd-agent when counting running containers. You can add more in containers_running
in the script below.
I am no longer abe to monitor this post , I have decided to move everything to my personal blog for better monitoring.
Please click here to access the full post
#!/usr/bin/env -S bash -xo pipefail | |
users=( "$@" ) | |
baseurl="https://registry.hub.docker.com/v2" | |
#baseurl="https://registry-1.docker.io/v2" | |
function get_token { | |
local user="${1}" | |
local repo="${2}" | |
local scope="repository:${user}/${repo}:pull" |
/** | |
* Prints the path to all values whose names match the given regular expression. | |
* | |
* @param {Object} input - An object that contains the parent from where to | |
* start searching recursively for all key names. | |
* | |
* The input object can be passed with just an standalone value, which then | |
* will be used itself as the prefix for the result. | |
* | |
* For example, for a parent object `root` which contains a hierarchy of |