git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
--- R-3.2.1/src/main/memory.c.orig 2015-07-31 23:15:07.017151621 -0700 | |
+++ R-3.2.1/src/main/memory.c 2015-07-31 23:17:10.185150073 -0700 | |
@@ -3724,11 +3724,21 @@ | |
static FILE *R_MemReportingOutfile; | |
static R_size_t R_MemReportingThreshold; | |
+static void printLineNum(FILE *file, SEXP srcref) { | |
+ if (srcref && !isNull(srcref)) { | |
+ int line = asInteger(srcref); | |
+ fprintf(file, "#%d ", line); |
#!/bin/sh | |
# -*- mode:R -*- | |
#PBS -l nodes=1:ppn=8,mem=30gb | |
'\' >/dev/null 2>&1 || true | |
# This is bash code to set up the environment | |
echo "Hello from bash!" | |
echo "Args are: $@" |
This information is likely to quickly become outdated when Qualtrics next changes the formatting of the QSF file. This guide was started February 2017. I hope that it is a useful introduction to understanding the contents of the QSF file that one can download from Qualtrics.
This document includes:
# This makes a feature-complete macOS-centric CRAN mirror that ends up being ~72GB | |
# for most ops: recurse, preserve mod times, preserve symlinks, ensure compression for xfers and delete extraneous files | |
# get macOS pkg binaries | |
rsync -rlptDz --delete cran.r-project.org::CRAN/bin/macosx/mavericks/contrib/3.2/ /cran/bin/macosx/mavericks/contrib/3.2/ | |
rsync -rlptDz --delete cran.r-project.org::CRAN/bin/macosx/mavericks/contrib/3.3/ /cran/bin/macosx/mavericks/contrib/3.3/ | |
rsync -rlptDz --delete cran.r-project.org::CRAN/bin/macosx/mavericks/contrib/3.4/ /cran/bin/macosx/mavericks/contrib/3.4/ | |
rsync -rlptDz --delete cran.r-project.org::CRAN/bin/macosx/el-capitan/ /cran/bin/macosx/el-capitan/ |
argify = function(expr, recursive = FALSE) { | |
if(is.character(expr)) | |
expr = parse(text = expr) | |
else if(!is.call(expr)) | |
expr = substitute(expr) | |
stopifnot(is.call(expr)) | |
if(recursive && length(expr) > 1) { | |
for(i in 2:length(expr)) { | |
if(is.call(expr[[i]])) | |
expr[[i]] = argify(expr[[i]], TRUE) |
The R package XML
for parsing and manipulation of XML documents in R is not actively maintained anymore, but used by many:
The R package xml2
is an actively maintained, more recent alternative.
This file documents useful resources and steps for moving from XML
to xml2
.
#!/usr/bin/bash -xe | |
cat <<EOF > "${HOME}/.config/systemd/user/zoom.slice" | |
[Slice] | |
AllowedCPUs=0-4 | |
MemoryHigh=6G | |
EOF | |
cat /usr/share/applications/Zoom.desktop | sed -E 's#^(Exec=).*$#Exec=/usr/bin/systemd-run --user --slice=zoom.slice /opt/zoom/ZoomLauncher#' > "${HOME}/.local/share/applications/Zoom.desktop" |
I use Ubuntu (20.04 LTS, now 22.04 LTS) as my main operating system. Some background on switching from OS X to Ubuntu here: https://github.com/bjohas/Ubuntu-keyboard-map-like-OS-X. I don't really use Windows at all, and I am surprised with how the intial setup of Windows has gone wrong for some of my friends (missing dlls, etc etc). However, there are a few 'OS X / Windows only things' and with a larger SSD on a new laptop, I thought I'd preserve Windows. E.g., 'OS X / Windows only things' include Adobe Creative Suite, as well as using Oculus/Meta Quest 2 via a PC connection.
I used these instructions to dual-boot-ubuntu-and-windows-with-encryption.md https://www.mikekasberg.com/blog/2020/04/08/dual-boot-ubuntu-and-windows-with-encryption.html
Dual-booting with encrypted storage should not be this hard in
20202022.