Skip to content

Instantly share code, notes, and snippets.

View amatsuo's full-sized avatar
💭
I may be slow to respond.

Aki Matsuo amatsuo

💭
I may be slow to respond.
View GitHub Profile
@alexeyknorre
alexeyknorre / stargazer_fix.r
Created May 31, 2022 04:50
Quick fix for stargazer <= 5.2.3 is.na() issue with long model names in R >= 4.2
## Quick fix for stargazer <= 5.2.3 is.na() issue with long model names in R >= 4.2
# Unload stargazer if loaded
detach("package:stargazer",unload=T)
# Delete it
remove.packages("stargazer")
# Download the source
download.file("https://cran.r-project.org/src/contrib/stargazer_5.2.3.tar.gz", destfile = "stargazer_5.2.3.tar.gz")
# Unpack
untar("stargazer_5.2.3.tar.gz")
# Read the sourcefile with .inside.bracket fun
@jaeddy
jaeddy / rstudio_ami_guide.md
Last active January 22, 2024 21:36
steps for creating and configuring a new AMI with RStudio Server

Building a new RStudio Server AMI

The steps below can be followed to create a new AMI for use with Amazon EC2 instances that includes the latest versions of R, RStudio, and RStudio Server. The idea is inspired by the work of Louis Aslett, who creates and hosts his own public AMIs for RStudio. My own goal was to create an AMI with RStudio v1.0.0 or higher, such that I could use the recent R Notebooks feature. However, the instructions should generally apply for whenever you might be impatient accessing the latest version of R-related software on AWS (via an interactive browser interface...).

Getting started

  1. Create a new EC2 instance with the latest Ubuntu AMI (should be fine to do with Spot); based on Louis Aslett's AMI, I opted to include a general purpose SSD EBS volume with 10GB of storage space
  2. SSH into the instance

Downloading/installing RStudio Server

@jagregory
jagregory / gist:710671
Created November 22, 2010 21:01
How to move to a fork after cloning
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear!
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.
* Off the top of my head *
1. Fork their repo on Github
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it
git remote add my-fork git@github...my-fork.git