Skip to content

Instantly share code, notes, and snippets.

View abalter's full-sized avatar

Ariel Balter abalter

  • Center For Health Systems Effectiveness, OHSU
  • Portland, OR
View GitHub Profile
Automate Chunks of Analysis in R Markdown
========================================================
```{r setup, echo=FALSE}
library(knitr)
library(DT)
```
```{r create-datasets, echo=FALSE}
@josephhainline
josephhainline / convert_github_md_to_gitlab_format.sh
Created May 10, 2015 02:30
If you have repos in github that you'd like to port to gitlab, with all branches and tags, this will do it. If you want to port your wikis too, this will also work, although it's only a 90% solution for wikis. Github and gitlab use different file name and markdown conventions. Run the command port_repos_and_wikis_from_github_to_gitlab.sh to get …
#!/bin/bash
echo
echo "Processing all *.md files in current directory..."
echo
# Loop through all .md files in directory and rename spaces to dashes
for file in *" "*; do
echo "Renaming $file"
mv -- "$file" "${file// /-}"
@Pakillo
Pakillo / Rmarkdown-fontsize.Rmd
Created January 22, 2015 22:32
Changing font sizes of HTML ouput in Rmarkdown
---
title: "Untitled"
author: "Francisco Rodriguez-Sanchez"
date: "Thursday, January 22, 2015"
output: html_document
---
<style type="text/css">
body, td {
@hieblmedia
hieblmedia / .gitignore
Last active March 20, 2024 01:22
Gitignore - Exclude all except specific subdirectory
#
# If all files excluded and you will include only specific sub-directories
# the parent path must matched before.
#
/**
!/.gitignore
###############################
# Un-ignore the affected subdirectory
@m14t
m14t / fix_github_https_repo.sh
Created July 5, 2012 21:57
Convert HTTPS github clones to use SSH
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'`
if [ -z "$REPO_URL" ]; then
echo "-- ERROR: Could not identify Repo url."
echo " It is possible this repo is already using SSH instead of HTTPS."
exit
fi