Skip to content

Instantly share code, notes, and snippets.

View ErikGranse's full-sized avatar

Erik Granse ErikGranse

  • Daugherty Business Solutions
  • Minneapolis, MN
View GitHub Profile
[alias]
rekt = reset --hard
tidy = !git remote prune origin && git branch -vv | grep ':gone]' | awk '{print }' | xargs git branch -D
unwatch = update-index --assume-unchanged
watch = update-index --no-assume-unchanged
unwatched = "!git ls-files -v | grep '^[[:lower:]]'"
watchall = "!git unwatched | xargs -L 1 -I % sh -c 'git watch `echo % | cut -c 2-`'"
@ErikGranse
ErikGranse / parser.py
Created November 10, 2022 08:21
Python parser for transcripts from MS teams
import re, sys
from os.path import exists
def parse_file(source):
parse_file(source, sys.stdout)
def parse_file(input_file, output_file):
author_index = 1
text_index = 2
author = ''
// Analyze the following code snippet for "code smells"
// Assume the method below is in a class, and it already compiles successfully
// ---
/**
* Calculates the weight of a person for a given unit on a given planet
*
*/
public float calculateWeight(int personId, String unit, int planetId) {
Person person = personDao.getPerson(personId);