Skip to content

Instantly share code, notes, and snippets.

View codeswish's full-sized avatar
🏠
Working from home

Dan Schmidt codeswish

🏠
Working from home
View GitHub Profile
@rak1507
rak1507 / aoc.py
Last active December 11, 2021 18:56
#day 1
*a,=map(int,open(0))
print(sum(i<j for i,j in zip(a,a[1:])))
print(sum(i<j for i,j in zip(a,a[3:])))
#day 2
from itertools import accumulate
print(sum(d:=[1j**'fd'.find(i[0])*int(i.split()[1]) for i in open(0)]).real*sum(d).imag)
print(sum(i.real*j.imag for i,j in zip(d, accumulate(d)))*sum(d).real)
@staltz
staltz / introrx.md
Last active October 9, 2025 18:43
The introduction to Reactive Programming you've been missing
@railwaycat
railwaycat / Emacs_starter.pl
Last active July 24, 2025 18:53
Start Emacs.app from CLI
#!/usr/bin/perl
# Emacs starter for Emacs mac port
# Thanks to Aquamacs Project and David Reitter
my $args = "";
my $tmpfiles = "";
for my $f (@ARGV) {