Skip to content

Instantly share code, notes, and snippets.

View jesustorresdev's full-sized avatar

Jesús Torres jesustorresdev

View GitHub Profile
@jesustorresdev
jesustorresdev / notify-send-all
Last active May 19, 2024 17:19
Script for the root to send desktop notifications to all active sessions
#!/bin/bash
#
# notify-send-all - Script to send desktop notifications to all active sessions
#
# https://gist.github.com/aplatanado/e8810dbceece820b4ae5aa0ee5ca200a
#
### Utility functions
# A few utility functions to show errors, handle programa exit and more
@jesustorresdev
jesustorresdev / snapraid
Last active November 8, 2016 20:34
Script for nightly SnapRAID syncs and scrubs by @rubylaser (http://zackreed.me/updated-snapraid-sync-script/)
# /etc/cron.d/snapraid: crontab entries for snapraid package
# Run a SnapRAID diff and then sync
30 23 * * * root /usr/local/sbin/snapraid_diff_n_sync.sh
@jesustorresdev
jesustorresdev / smartmontools-run.d-notify
Last active November 8, 2016 19:09
Smartmontools visual notification script for desktop environments
#!/bin/bash -e
#
# smartmontools-run.d-notify - Smartmontools visual notification script for desktop environments
#
# https://gist.github.com/aplatanado/1331876d6e1547aeb9b2d02861e9ae92
#
# Requires notify-send-all:
# https://gist.github.com/aplatanado/e8810dbceece820b4ae5aa0ee5ca200
#
@jesustorresdev
jesustorresdev / main.cpp
Created March 28, 2016 16:20
Ejemplo de pool de hilos en C++
#include <iostream>
#include <condition_variable>
#include <mutex>
#include <queue>
#include <thread>
#include <memory>
#include <vector>
#include "unistd.h"