Skip to content

Instantly share code, notes, and snippets.

View cruizba's full-sized avatar

Carlos Ruiz Ballesteros cruizba

View GitHub Profile
@gene1wood
gene1wood / all_aws_lambda_modules_python.md
Last active April 25, 2024 03:06
AWS Lambda function to list all available Python modules for Python 2.7 3.6 and 3.7
@fernandezpablo85
fernandezpablo85 / git-maven-howto.md
Last active April 16, 2024 17:02
how to create your own maven repository on github

How to create a maven repository for your github project step by step

Clone your project in a separate folder

(note: replace ORGANIZATION and PROJECT)

git clone git clone git@github.com:ORGANIZATION/PROJECT.git my-repository

Cd into it

@tarruda
tarruda / README.md
Last active April 8, 2024 23:13
LXD: Full Debian KDE desktop

Intro

This script will create a local LXD image that has a full KDE desktop environment with Xspice as the display server.

Instructions

./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

@espoirMur
espoirMur / install_nvidia_driver.md
Last active April 1, 2024 19:22
How I fix this issue NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running

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

@kui
kui / gist:2622504
Last active February 25, 2024 19:21
get the active window on X window system.
// -*- 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`
@Eyjafjallajokull
Eyjafjallajokull / README.md
Last active December 25, 2023 02:53
AWS EBS - Find unused snapshots

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
@sandman
sandman / nvidia-xfce-desktop-container-popos-22.04
Created August 26, 2022 18:12
Installing and running a Dockerized NVIDIA Xfce desktop with ROS2 Foxy
# 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
@j1elo
j1elo / findValues.js
Last active October 10, 2022 15:37
Prints the path to all values whose names match the given regular expression.
/**
* 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
@teppeis
teppeis / README.md
Created March 15, 2018 03:41 — forked from prog893/README.md
ECS Container Instance scale-in protector
// 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)";