Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Decoding the world, one line at a time

Andrés Bretón bretonics

:octocat:
Decoding the world, one line at a time
View GitHub Profile
@bretonics
bretonics / .bash_profile
Last active Apr 3, 2021
Modified .bash_profile
View .bash_profile
# .bash_profile - login shells
# Template from https://gist.github.com/bretonics/5176d35739a0f4e7acfd
#-----------------------------------------------------------------------------------------------
# SOURCE
# Get Aliases and Functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
@bretonics
bretonics / Launcher
Created May 22, 2015
Mac Apps launcher- Launch all user essential apps at once
View Launcher
-- Launch all your desired apps at once, with a single call.
-- Works wonderful right after startup/reboot without compromising boot time
set appsFolder to "/Applications"
set Apps to {"Mail", "Google Drive", "MenuMate", "Due", "PopClip", "Window Tidy", "Yoink",
"Trickster", "DropZone", "Mint QuickView", "unDock", "Visits", "CalendarFree", "Degrees"} --Change/add desired apps here
repeat with theItem in Apps
launch application theItem
end repeat
@bretonics
bretonics / .bashrc
Last active Apr 3, 2021
Personalized .bashrc
View .bashrc
# .bashrc - interactive, non-login shells
# Template from https://gist.github.com/bretonics/f3b61fcd1fa946df6dac
#-----------------------------------------------------------------------------------------------
# GLOBAL SOURCE
# Global Definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
View snippets.cson
# -------------------------------------------------------------------------------
# GENERAL
'.source':
# Main Description Header
'Main Header':
'prefix': 'header'
'body': """
# ================================================================================
#
@bretonics
bretonics / bashTricks.md
Last active Nov 4, 2020
Tricks to remember on the CL
View bashTricks.md
Script source path - ${BASH_SOURCE} contains full bath to script
# /path/to/repo/bin/script
BIN_PATH="$(dirname ${BASH_SOURCE})"  # gets 'bin' directory path script is in
DIR_PATH="$(dirname $BIN_PATH)"       # gets the main 'repo' directory path
Rename file by replacing old text pattern with new (overwrite existing)
for f in *.txt ; do echo "${f/old/new}"; done
@bretonics
bretonics / shiny_references.md
Last active Mar 20, 2018
Shiny Framework Function Reference Sheet
View shiny_references.md

Shiny Reference Sheet

A web application framework for R quick function reference sheet.

Input

Function Creates
actionButton() Action button element
submitButton() Submit button element
@bretonics
bretonics / progress-bar.sh
Created Nov 28, 2017 — forked from F1LT3R/progress-bar.sh
Bash Progress Bar
View progress-bar.sh
#!/bin/bash
# Bash Progress Bar: https://gist.github.com/F1LT3R/fa7f102b08a514f2c535
progressBarWidth=20
# Function to draw progress bar
progressBar () {
# Calculate number of fill/empty slots in the bar
View .bash_functions
# .bash_functions - User bash functions
# Template from https://gist.github.com/bretonics/894d8c2d1d4813c36b7d36e9a97aedd6
#-------------------------------------------------------------------------------
# SYSTEM
mkcd() {
mkdir $1; cd $1
}
@bretonics
bretonics / crontab
Last active May 25, 2022
Crontab template
View crontab
# Crontab - Crontab template to automate virtual world
# Template from https://gist.github.com/bretonics/9a48a3b9ef32d93d15f45c3f007550b4
# Andrés Bretón ~ http://andresbreton.com, dev@andresbreton.com
# ==============================================================================
# MIN(0-59) HOUR(0-23) DOM(1-31) M(1-12) DOW(0-6) CMD
# |__________|_________|_______|________|______ |__MINUTE of
# |_________|_______|________|______ |__HOUR of
@bretonics
bretonics / CR_counts.qsub
Last active Nov 4, 2020
Template file to run Cell Ranger on Sun Grid Engine (SGE)
View CR_counts.qsub
#!/bin/bash -l
# cellranger.qsub - A template file to run Cell Ranger on Sun Grid Engine (SGE)
# Andrés Bretón ~ http://andresbreton.com, dev@andresbreton.com
# Template from https://gist.github.com/bretonics/f6c57474bb077d2acd293092cf7fa449#
#-------------------------------------------------------------------------------
# ENVIRONMENTAL VARIABLES AVAILABLE