Skip to content

Instantly share code, notes, and snippets.

View jkglasbrenner's full-sized avatar

James K. Glasbrenner jkglasbrenner

  • The MITRE Corporation
  • McLean, VA
View GitHub Profile
@jkglasbrenner
jkglasbrenner / cloudSettings
Last active January 3, 2022 18:32
Visual Studio Code Settings Sync Gist
{"lastUpload":"2022-01-03T18:32:54.369Z","extensionVersion":"v3.4.3"}
@jkglasbrenner
jkglasbrenner / texlive.profile
Last active October 4, 2018 00:08
Script for installing texlive from source on Travis CI. Adapted from: https://github.com/latex3/latex3/blob/master/support/texlive.sh
selected_scheme scheme-custom
TEXDIR /opt/texlive/2018
TEXMFCONFIG ~/.config/texlive2018/texmf-config
TEXMFHOME ~/texmf
TEXMFLOCAL /opt/texlive/texmf-local
TEXMFSYSCONFIG /opt/texlive/2018/texmf-config
TEXMFSYSVAR /opt/texlive/2018/texmf-var
TEXMFVAR ~/.config/texlive2018/texmf-var
binary_x86_64-linux 1
collection-basic 1
@jkglasbrenner
jkglasbrenner / bobp-python.md
Created September 19, 2018 13:05 — forked from sloria/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
set smoothscroll
set completeonopen
set cncpcompletion
set autohidecursor
set showtabindices
set autoupdategist
let scrollstep = 100
let barposition = "bottom"
@jkglasbrenner
jkglasbrenner / knit_projects.sh
Created June 10, 2018 21:53
Simple command to knit rmarkdown documents via a make command in directories found using pattern matching
#!/bin/bash
#
# Simple command to knit rmarkdown documents via a make command in directories
# found using pattern matching
###############################################################################
# Global parameters
###############################################################################
readonly args="${@:1}"
@jkglasbrenner
jkglasbrenner / aligned_allocator.cpp
Created February 9, 2018 19:32 — forked from donny-dont/aligned_allocator.cpp
An aligned allocator for placing SIMD types in std::vector
#ifdef _WIN32
#include <malloc.h>
#endif
#include <cstdint>
#include <vector>
#include <iostream>
/**
* Allocator for aligned data.
@jkglasbrenner
jkglasbrenner / how-to-mirror-repo-with-git-lfs-data.md
Created December 30, 2017 16:11
Notes on how to migrate/mirror a repository that contains Git LFS data

You need to take some extra care when attempting to mirror a repo containing Git LFS data. This thread discusses some of the steps you can take when attempting to do so. If you've already pushed to the mirror, but the Git LFS data itself did not upload, then the following command will work:

git lfs push --all origin

This is assuming that you're pushing to origin. If instead the mirror is named remote or mirror, use that instead.

@jkglasbrenner
jkglasbrenner / fix-r-install-windows.md
Last active December 6, 2017 01:06
Fixing R installation errors on Windows machines

How to fix the R configuration on Windows 10

  1. Verify that you have an up-to-date version of R. In your Console window, run:

    R.version

    Look at the output to the right of version.string. It should say something like R version 3.4.1. The first two numbers are most important, if it says 3.2.x or 3.3.x (the value in x doesn't matter) then the R installation should be updated. You can update it with the installr package. If you do not have installr available, run:

# Assume we are in your home directory
cd ~/
# Clone the repo from GitLab using the `--mirror` option
$ git clone --mirror git@your-gitlab-site.com:mario/my-repo.git
# Change into newly created repo directory
$ cd ~/my-repo.git
# Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks.