News for hackers. Stuff that matters.
Re:Show HN: Unix-like personal webpage by tekknolagi on Monday July 17, 2017 @01:34PM (#14790660)
What is this supposed to look like? For me it was a lot of random colors.
Re:Show HN: Unix-like personal webpage by sp332 on Monday July 17, 2017 @02:02PM (#14790903)
It's a bash script. Execute it and it shows a dancing woman.

Edit: ok the bash thing is a red herring. It works if you just "cat lady".

Re:Show HN: Unix-like personal webpage by rijoja on Monday July 17, 2017 @02:25PM (#14791095)
you are right, I started out with piping it into less, to see if you are right and damn it if you are not right. I thought he did something with delays in the output. How and why does this work?
Re:Show HN: Unix-like personal webpage by idsout on Monday July 17, 2017 @02:50PM (#14791299)
ANSI escape sequences. Your terminal interprets them like move cursor to row x, column y. Set color green. Etc.

https://en.wikipedia.org/wiki/ANSI_escape_code

Re:Show HN: Unix-like personal webpage by rijoja on Tuesday July 18, 2017 @10:15AM (#14796645)
Interesting? but why does bash execute the code from standard output instead of simply displaying it to the user?
Re:Show HN: Unix-like personal webpage by sp332 on Tuesday July 18, 2017 @02:11PM (#14798759)
It's not bash. You can remove the shebang line and cat the file, and it still works. It's simply your terminal interpreting the ANSI codes and displaying the contents of the file.
Re:Show HN: Unix-like personal webpage by rijoja on Monday July 17, 2017 @02:18PM (#14791029)
well a shell command if you can excuse my nitpicking. Had it been a bash script he wouldn't only have made a really nice easter egg but also found a security hole in curl.