Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect extremely long output and make it a gist #259

Open
skalnik opened this issue Sep 27, 2016 · 1 comment
Open

Detect extremely long output and make it a gist #259

skalnik opened this issue Sep 27, 2016 · 1 comment

Comments

@skalnik
Copy link
Member

skalnik commented Sep 27, 2016

I was ranting about our Hayt spam to @jameswhite and he purposed a great solution. If the output will be over some number, throw it into a Gist and then paste the link. This would solve our spam problem when @croddy decides to ask who is Muta_work.

@jameswhite
Copy link

This will take the first 3 lines, put them to stdout and gist the whole thing and paste the gist link to stdout.

echo -n "${GITHUB_USER_ACCESS_TOKEN}" > "${HOME}/.gist"
cat - | tee >(echo -e '```'; head -3 ; echo -n -e "...\n"; echo -n '```'; echo -n -e "\nContinued in: ")  >(gist -p)  >/dev/null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants