Skip to content

Instantly share code, notes, and snippets.

@raspiduino
Created August 12, 2022 03:24
Show Gist options
  • Save raspiduino/ecd17e38291a38df37f6b34886d9a5bb to your computer and use it in GitHub Desktop.
Save raspiduino/ecd17e38291a38df37f6b34886d9a5bb to your computer and use it in GitHub Desktop.
Remove the first `+` character in a diff when you need to copy some large added code
f = open("in.c")
a = f.read().split("\n")
f.close()
b = []
for i in a:
b.append(a[1:])
f = open("out.c", "w")
f.write('\n'.join(b))
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment