Skip to content

Instantly share code, notes, and snippets.

View jasonnicholson's full-sized avatar

Jason H. Nicholson jasonnicholson

View GitHub Profile
@jasonnicholson
jasonnicholson / setup.sh
Created February 22, 2023 03:02
Setting up repo git hooks, configuration, and default configuration for git lfs
# Create a folder for git hooks
mkdir .githooks
# Configure hooks in a git configuration file stored in the repo
# Note, you will need to use -f flag to modify this file with git config
# later.
git config -f .gitconfig core.hooksPath .githooks
# Add .gitconfig as an include in the LOCAL configuration file
git config --local include.path ../.gitconfig
@jasonnicholson
jasonnicholson / taylorSeriesExample.m
Last active May 6, 2021 16:45
This is the code used to generate the taylor series animations.
clc; clear; close all;
%% exp(x) about 0
titleName = "exp(x) about 0";
func = @(x) exp(x);
expansionPoint = 0;
domain = [-5 5];
maxOrder = 20;
createVideo(titleName, func, expansionPoint, domain, maxOrder);
@jasonnicholson
jasonnicholson / Installing git filter-repo, rewriting repo.md
Last active February 28, 2021 20:54
Installing git filter-repo, rewriting repo

Objective

Rewrite a repo removing any traces of personal email address such as commit email, email, and sign-off.

Details

git-filter-branch is slow. Also, it is known to be problematic. I have experienced the slow but didn't run into the problematic part. Instead, I just went for using git-filter-repo.

git-filter-repo was not straight forward to get installed on Windows. I tried several ways to get it working that I won't explain here. What worked was installing Anaconda and then pip installing git-filter-branch.

In an Anaconda prompt, I typed

@jasonnicholson
jasonnicholson / OnePairEvaluatorTest.java
Last active August 29, 2015 14:00
Tests OnePairEvaluator for CS 227 at Iowa State University
package hw3;
import static org.junit.Assert.*;
import java.util.Arrays;
import org.junit.Before;
import org.junit.Test;
import api.Card;
@jasonnicholson
jasonnicholson / ArrayProcessor.java
Last active August 29, 2015 13:58
Exam 2 Review Proposed Student Solutions (Problem 6)
package exam2Review;
public class ArrayProcessor
{
// Processes values in an array using the given Processor
public static double runProcessor(double[] arr, Processor p)
{
for (int i = 0; i < arr.length; ++i)
{
p.process(arr[i]);
package hw2;
import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;
public class GameTest {
private String secretWord1;