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 May 25, 2024 20:06
AWS Lambda function to list all available Python modules for Python 2.7 3.6 and 3.7
# This xorg configuration file will start a dummy X11 server.
# move it to /etc/X11/xorg.conf
# don't forget apt install xserver-xorg-video-dummy;
# based on https://xpra.org/Xdummy.html
Section "ServerFlags"
Option "DontVTSwitch" "true"
Option "AllowMouseOpenFail" "true"
Option "PciForceNone" "true"
Option "AutoEnableDevices" "false"
@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 May 29, 2024 05:18
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
@kekru
kekru / 01nginx-tls-sni.md
Last active May 27, 2024 21:49
nginx TLS SNI routing, based on subdomain pattern

Nginx TLS SNI routing, based on subdomain pattern

Nginx can be configured to route to a backend, based on the server's domain name, which is included in the SSL/TLS handshake (Server Name Indication, SNI).
This works for http upstream servers, but also for other protocols, that can be secured with TLS.

prerequisites

  • at least nginx 1.15.9 to use variables in ssl_certificate and ssl_certificate_key.
  • check nginx -V for the following:
    ...
    TLS SNI support enabled
@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