This gist contains lists of modules available in
in AWS Lambda.
This gist contains lists of modules available in
in AWS Lambda.
This script will create a local LXD image that has a full KDE desktop environment with Xspice as the display server.
./setup-debian-kde-desktop-xspice.sh
lxc init debian-kde-desktop-xspice kde
lxc config device add kde xspicesocket proxy bind=host listen=unix:/tmp/kde.unix connect=unix:/run/xspice/spice.unix uid=1000 gid=1000
lxc start kde
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
// -*- 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 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
# Install latest version nvidia-docker2 on PopOS 22.04 | |
## PopOS does not take the latest upstream NVIDIA Container runtime which is needed to run the container | |
## Run the below steps | |
### Add a new preference entry in /etc/apt/preferences.d/pop-default-settings | |
Package: * | |
Pin: origin nvidia.github.io | |
Pin-Priority: 1002 |
/** | |
* 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 |
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.
// Replacer function meant for `JSON.stringify()`. | |
function getCircularReplacer() { | |
const seen = new WeakSet(); | |
return (_key, value) => { | |
// Non-null "object" properties: return a deep copy without circular references. | |
if (typeof value === "object" && value !== null) { | |
// Remove circular references. | |
if (seen.has(value)) { | |
// Option 1: Replace circular references with a string. | |
return "(circular)"; |