Skip to content

Instantly share code, notes, and snippets.

View chaimleib's full-sized avatar

Chaim Halbert chaimleib

View GitHub Profile
@chaimleib
chaimleib / filterJavaErrors.sed
Created January 6, 2020 22:15
Collapse Java stack traces (sed)
#!/usr/bin/env sed -n -f
### Collapse third-party errors to
### at com.thirdparty.theirPackage first error text
### ...
### at com.thirdparty.theirPackage last error text
{
:loop
/\t*at com\.evernote/ b print
def shell_escape(s, quote_empty=True):
if quote_empty and s == '':
return "''"
squot = False
dquot = False
dquot_special = False
special = False
escaped = []
for c in s:
if c == "'":