Skip to content

Instantly share code, notes, and snippets.

View cruizba's full-sized avatar

Carlos Ruiz Ballesteros cruizba

View GitHub Profile
@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`
@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

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

@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"
@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