Skip to content

Instantly share code, notes, and snippets.

Andrés Bretón bretonics

Block or report user

Report or block bretonics

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
bretonics / add-sftp-user
Created Feb 25, 2019
Automate adding new SFTP chrooted accounts
View add-sftp-user
#!/usr/bin/env bash
# Automate adding new SFTP accounts (chrooted)
# --------------------------------------------------------------------------------
if [ $# == 0 ]; then
echo "Usage: add-sftp-user EMAILS "
echo "Automates adding a SFTP user account, delagating all tasks and sending confirmation email."
bretonics / disk-usage-alert.cron
Created Feb 22, 2019
Available disk usage alert setup to run weekly on crontab
View disk-usage-alert.cron
# /etc/cron.weekly/
SUBJECT="Disk Usage Alert!"
BODY="WARNING! $(hostname) disk space is currently at ${USED}% capacity."
bretonics / macOS
Last active Aug 2, 2018
macOS Tips and Tricks
View macOS
# Remove Dock Delay for Auto-Hide & Auto-Show
defaults write autohide-delay -float 0 && killall Dock
# Reset Dock Hide/Show Delay defaults
defaults delete autohide-delay && killall Dock
# Reduce autohide Dock animation
defaults write autohide-time-modifier -float 0.25; killall Dock
# Reset autohide Dock animation defaults
bretonics / template.qsub
Last active Aug 2, 2018
Template file for Sun Grid Engine (SGE) job submissions
View template.qsub
#!/bin/bash -l
# template.qsub - Template file for Sun Grid Engine (SGE) job submissions
# Andrés Bretón,
# Template from
bretonics / cellranger.qsub
Last active Aug 9, 2019
Template file to run Cell Ranger on Sun Grid Engine (SGE)
View cellranger.qsub
#!/bin/bash -l
# cellranger.qsub - A template file to run Cell Ranger on Sun Grid Engine (SGE)
# Andrés Bretón ~,
# Template from
# ================================================================================
bretonics / crontab
Last active Aug 2, 2018
Crontab template
View crontab
# Crontab - Crontab template to automate virtual world
# Template from
# Andrés Bretón ~,
# ==============================================================================
# MIN(0-59) HOUR(0-23) DOM(1-31) M(1-12) DOW(0-6) CMD
# |__________|_________|_______|________|______|__MINUTE of
# |_________|_______|________|______|__HOUR of
View .bash_functions
# .bash_functions - User bash functions
# Template from
mkcd() {
mkdir $1; cd $1
bretonics /
Created Nov 28, 2017 — forked from F1LT3R/
Bash Progress Bar
# Bash Progress Bar:
# Function to draw progress bar
progressBar () {
# Calculate number of fill/empty slots in the bar
bretonics /
Last active Mar 20, 2018
Shiny Framework Function Reference Sheet

Shiny Reference Sheet

A web application framework for R quick function reference sheet.


Function Creates
actionButton() Action button element
submitButton() Submit button element
bretonics /
Last active Oct 26, 2019
Tricks to remember on the CL
Rename file by replacing old text pattern with new (overwrite existing)
for f in *.txt ; do echo "${f/old/new}"; done

for f in *.txt; do mv "$f" `echo $f | sed s/old/new/\`; done
Find symlink to same inode
find -L / -samefile path/to/file.txt
You can’t perform that action at this time.