From 220dc71a6aafad18298b331f6b71393cc52f0344 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Sat, 1 Dec 2018 00:52:20 -0500 Subject: Solve day 1 part 2 --- 2018/day01-2.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 2018/day01-2.sh (limited to '2018') diff --git a/2018/day01-2.sh b/2018/day01-2.sh new file mode 100644 index 0000000..66521fb --- /dev/null +++ b/2018/day01-2.sh @@ -0,0 +1,8 @@ +seq -f "$(cat)" ${1:-150} \ + | sed 's/^/last/' \ + | bc \ + | cat -n \ + | sort -s -n -k 2 \ + | uniq -d -f 1 \ + | sort -b -n \ + | head -n 1 -- cgit 1.4.1 showmsg' value='1'/> dontfiles
summary refs log tree commit diff
path: root/bin/when.y (unfollow)
Commit message (Collapse)Author
2020-06-08Replace __DECONST with regular castsJune McEnroe
sed -E 's/__DECONST[(]([^,]+), ([^)]+)[)]/(\1)(\2)/'
2020-06-08Replace __printflike with __attribute__((format(printf, ...)))June McEnroe
sed -E 's/__printf0?like[(]([^,]+), ([^)]+)[)]/__attribute__((format(printf, \1, \2)))/'
2020-06-08Replace __dead2 with __attribute__((noreturn))June McEnroe
sed 's/__dead2/__attribute__((noreturn))/'
2020-06-08Replace __FBSDID macros with commentsJune McEnroe
sed -E 's|__FBSDID[(]"([^"]+)"[)];|/* \1 */|'
2020-06-08Remove reference to FreeBSD-specific libedit hackJune McEnroe
Newer versions of libedit have sane tab-complete now without FreeBSD's hacks, and in fact the hack is gone in FreeBSD-CURRENT. I'm still a little confused why binding this weird function is necessary at all, but at least it exists everywhere, I guess.
2020-06-08Prefix mandoc with exec in about-filterJune McEnroe
2020-06-07Remove mktemp options from mkbuiltins, mktokensJune McEnroe
Why even?
2020-06-07Cast z_stream fields to size_tJune McEnroe
In the version of zlib in OpenBSD, these fields are of type off_t, which is signed (why?), rather than uLong.
2020-06-07Call static_assert by _Static_assertJune McEnroe
OpenBSD doesn't #define static_assert in assert.h and _Static_assert is its real name I guess so why not?
2020-06-07Add OpenBSD to install.shJune McEnroe
Straightforward.
2020-06-03Add The Song of AchillesJune McEnroe
2020-06-01Allow redirecting input in everJune McEnroe
2020-05-31Add %c conversion to c scriptJune McEnroe
2020-05-31Add c script to READMEJune McEnroe
2020-05-31Add c scriptJune McEnroe
2020-05-31Update mdoc source URLsJune McEnroe
2020-05-26Remove unfinished PSF fontsJune McEnroe