Skip to content

Instantly share code, notes, and snippets.

View vicentebolea's full-sized avatar
🎯
Coding

Vicente Bolea vicentebolea

🎯
Coding
View GitHub Profile
@vicentebolea
vicentebolea / recordmydesktop
Created June 9, 2020 20:23
recordmydesktop with pulse
recordmydesktop does not work with Opensuse + pulse.
use instead recordmydesktop --device default
# Setup those vars at /etc/environment
# PASSPHRASE=
# GS_ACCESS_KEY_ID=
# GS_SECRET_ACCESS_KEY=
# GS_REMOTE=
set -x
SOURCES=(
"/etc"
"/usr/local"
@vicentebolea
vicentebolea / pb
Last active November 28, 2018 07:31
NOTIFIES TO PUSHBULLET FROM TERMINAL, sends a message to pushbullet, useful to put after a command that takes long time, add $PUSHBULLET_TOKEN to your ~/.bashrc
#!/bin/bash
curl -s -u "$PUSHBULLET_TOKEN": \
-X POST https://api.pushbullet.com/v2/pushes \
--header 'Content-Type: application/json' \
--data-binary '{"type": "note", "title": "'"`hostname`"'", "body": "'"DONE"'"}' >/dev/null 2>&1
@vicentebolea
vicentebolea / grid-picture
Last active September 18, 2018 09:27
Create a collage of multiple png
montage -pointsize 36 -label '%f' $(ls -S *.png | sort -nu) -frame 5 -tile 3x3 -geometry 500 aggregate-task-diagrams.pdf
@vicentebolea
vicentebolea / bash-template.sh
Created June 30, 2018 19:00
Simple BASH template engine
#!/bin/bash
rules=$1
source $rules
mapfile -t keywords < <(< $1 sed -n 's/^\([A-Za-z0-9_]\+\)=.*$/\1/p')
while read line
do
for keyword in "${keywords[@]}"
@vicentebolea
vicentebolea / plot_tasks.R
Last active June 28, 2018 09:41
Generates a time series plot for Parallel Tasks
require(ggplot2)
require(scales)
## Variables to be set
FONT_SIZE_X=12
FONT_SIZE_Y=5
## Source code
args = commandArgs(trailingOnly=TRUE)
@vicentebolea
vicentebolea / docker-composer.yml
Created September 15, 2017 08:58
Zookeeper docker composer + web UI
version: '2.1'
services:
zoo1:
image: 31z4/zookeeper
container_name: zookeeper-server
#restart: always
ports:
- "2181:2181"
@vicentebolea
vicentebolea / git_correct_email.sh
Created January 31, 2017 07:29
Correct the email and name in a git repository
#!/bin/sh
git filter-branch -f --env-filter '
OLD_EMAIL="vicentebolea@gmail.com"
CORRECT_NAME="Vicente Adolfo Bolea Sanchez"
CORRECT_EMAIL="vicente.bolea@gmail.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
@vicentebolea
vicentebolea / gist:43a03112c6159eb21453
Created January 27, 2016 04:00 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@vicentebolea
vicentebolea / terminal_statusbar.c
Created May 20, 2014 06:26
A simple status bar for terminal using ANSI escape sequences
#include <stdio.h>
#include <unistd.h>
#include <string.h>
void statusbar_to_stdout (const char * item, int percentage) {
int i, pos;
char per_bar [50 + 1] = {'-'};
if (percentage > 100) percentage %= 100;
pos = percentage / 2;
printf ("\e[?25l"); // Hide cursor