The one-line solution for part 2 of Day 3 of Advent of Code:
jq -sR '[([1,1],[3,1],[5,1],[7,1],[1,2]) as $slope | ./"\n" | [.,([range(length)]|map(.%$slope[1]))] | transpose | map(select(.[1]==0)|.[0]) | (.[0] | length) as $w| [.,([range(0;length*$slope[0];$slope[0])]|map(.%$w))] | transpose | map(.[0][.[1]:.[1]+1] | select(.=="#")) | length] | reduce .[] as $i (1; . * $i)' < input.txt
And an annotated version. This is the same code as above, with more whitespace, longer variable names, and comments.
[
([1,1],[3,1],[5,1],[7,1],[1,2]) as $slope | ## Loop through all possible slope values, assigning it to the $slope variable.
./"\n" | ## `.` is the entire input file (because we call `jq -sR`). Here we split it into lines.