This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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-`'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |