Skip to content

Instantly share code, notes, and snippets.

View cruizba's full-sized avatar

Carlos Ruiz Ballesteros cruizba

View GitHub Profile
@AndnixSH
AndnixSH / xorg.conf
Last active May 3, 2024 18:54
This config allows you to start desktop environment and enable GPU acceleration without monitor connected. Official Nvidia driver is required if you use Nvidia card. NO DUMMY DISPLAY PLUGS REQUIRED
# By default, desktop environment won't start unless you connect your monitor
# This config allows you to start desktop environment and enable GPU acceleration without monitor connected. Official Nvidia driver is required if you use Nvidia card.
# NO DUMMY DISPLAY PLUGS REQUIRED
# Save the file to /etc/X11/xorg.conf
# Disable "Allow Flipping" in Nvidia settings to fix desktop flickering
# Tested on Linux Mint 21 with AnyDesk remote desktop
# GPU: NVIDIA GeForce GT 710
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
@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
@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

// 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)";
@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
@spacelatte
spacelatte / docker.touch.sh
Created October 4, 2020 14:22
#docker #hub #registry #pull #manifest #touch images to keep retention period of those from docker-hub's new policy ...
#!/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"
@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

@teppeis
teppeis / README.md
Created March 15, 2018 03:41 — forked from prog893/README.md
ECS Container Instance scale-in protector
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/**
*
* @author michel
*/
public class NewMain {
@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