Skip to content

Instantly share code, notes, and snippets.

View jgarces02's full-sized avatar

Juan-Jose Garces jgarces02

View GitHub Profile
@jgarces02
jgarces02 / github.R
Created April 21, 2023 15:28 — forked from z3tt/github.R
Configure GitHub for Rstudio
#### 1. Sign up at GitHub.com ################################################
## If you do not have a GitHub account, sign up here:
## https://github.com/join
# ----------------------------------------------------------------------------
#### 2. Install git ##########################################################
## If you do not have git installed, please do so:
@jgarces02
jgarces02 / clearRAM.sh
Created April 30, 2019 11:21 — forked from pklaus/clearRAM.sh
A Script to Clear Cached RAM on Linux
#!/bin/bash
## Bash Script to clear cached memory on (Ubuntu/Debian) Linux
## By Philipp Klaus
## see <http://blog.philippklaus.de/2011/02/clear-cached-memory-on-ubuntu/>
if [ "$(whoami)" != "root" ]
then
echo "You have to run this script as Superuser!"
exit 1
fi
@jgarces02
jgarces02 / exome-coverage-multi.R
Last active May 6, 2019 07:49 — forked from stephenturner/exome-coverage-multi.R
R code to plot fraction of captured target bases over depth for exome experiments
# Assumes you've already run coverageBed -hist, and grep'd '^all'. E.g. something like:
# find *bam | parallel 'bedtools coverage -hist -b {} -a /home/jgarces/genomes/sureSelect/sureSelect_v5_UTR/S04380219_Covered.bed | grep ^all > coverages/{}.hist.all.txt'
# Get a list of the bedtools output files you'd like to read in (all-in-one)
#print(files <- list.files(pattern="all.txt$"))
# Get a list of the bedtools output files you'd like to read in (by list)
args <- commandArgs(trailingOn = TRUE)
files <- scan(args[1], what = "", sep = "\n")
print(files <- paste0(files, ".hist.all.txt"))
#' Complete themes
#'
#' These are complete themes which control all non-data display. Use
#' [theme()] if you just need to tweak the display of an existing
#' theme.
#'
#' @param base_size base font size
#' @param base_family base font family
#' @param base_line_size base size for line elements
#' @param base_rect_size base size for rect elements
@jgarces02
jgarces02 / bash_shortcuts.txt
Created October 3, 2018 15:19
Some (veru useful) bash shortcuts!
## CTRL Key Bound
Ctrl + a - Jump to the start of the line
Ctrl + b - Move back a char
Ctrl + c - Terminate the command
Ctrl + d - Delete from under the cursor
Ctrl + e - Jump to the end of the line
Ctrl + f - Move forward a char
Ctrl + k - Delete to EOL
Ctrl + l - Clear the screen
Ctrl + r - Search the history backwards
@jgarces02
jgarces02 / gist:fd9091c2199cdfd114ee69025b8d8099
Created July 10, 2018 07:48 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@jgarces02
jgarces02 / spotify.ahk
Last active February 22, 2020 11:56
Some Spotify keyboard shortcuts (on Windows)
#Numpad4::^Media_Prev
#Numpad6::^Media_Next
#Numpad5::^Media_Play_Pause
#Numpad8::^Volume_Up
#Numpad2::^Volume_Down
##### Version 2 (no numeric keyboard)
; "Sifth + Windows + RIGHT" for next
#+Right::^Media_Next
@jgarces02
jgarces02 / gist:79a973fecc6e37d99ee9bcf13992a1ff
Created April 6, 2018 09:06
Prompt a notification when a long R process finishes
system('CMD /C ">>> ECHO The R process has finished running && PAUSE"',
invisible = FALSE, wait = FALSE)
@jgarces02
jgarces02 / ggplot2 dual axes
Last active December 7, 2017 11:28 — forked from jslefche/README.md
ggplot2 dual axes
## Dual axes for ggplot2
Modified from:
>https://stackoverflow.com/questions/21026598/ggplot2-adding-secondary-transformed-x-axis-on-top-of-plot
>https://rpubs.com/kohske/dual_axis_in_ggplot2
@jgarces02
jgarces02 / package.R
Last active July 18, 2017 14:42 — forked from jbryer/package.R
#' Simplified loading and installing of packages
#'
#' This code is taken and modified from jbryer (https://gist.github.com/jbryer/9112634)
#'
#' This is a wrapper to \code{\link{require}} and \code{\link{install.packages}}.
#' Specifically, this will first try to load the package(s) and if not found
#' it will install then load the packages. Additionally, if the
#' \code{update=TRUE} parameter is specified it will check the currently
#' installed package version with what is available on CRAN (or mirror) and
#' install the newer version.