5 ms·
Show HN: Building Pastebin for text using Nginx and Lua
- xorcist 6y agoIt's like mod_perl, but with lua!
- mhd 6y agoYeah, IIRC originally the nginx/lua integration was more about dynamically extending the core features and configuration, like virtual hosts or proxies. But that does get you a pretty high-speed interface, if you're willing to bet your money on both nginx and lua. There are some higher-level abstractions available, like lapis[1], which powers itch.io. [1]: https://leafo.net/lapis/ https://leafo.net/lapis/
- VWWHFSfQ 6y agowhat's with nill typo'd in multiple places
- pansa2 6y agoAs long as you never assign to it, `nill == nil`!
- eska 6y agoThat's basically why I dislike languages like this. I used to write World of Warcraft AddOns in lua. Refactoring was a pain. There'd often be some edge case I'd only notice days later where now a function argument was missing, was not passed in, or was mistyped for example.
- DarkWiiPlayer 6y agoLuacheck certainly helps, as would an editor with some syntax highlighting.
- FerretFred 6y agoAlso check out PrivateBin - this has some nice features: https://github.com/PrivateBin/PrivateBin https://github.com/PrivateBin/PrivateBin
- mro_name 6y agoIgnorance is a bliss! Love it.
- op00to 6y agoWow! No idea Nginx could do that!
- DarkWiiPlayer 6y agoIt's not just nginx; openresty adds a lot of features that go way beyond what plain nginx can do.
- usamaejaz 6y agoopenresty is really awesome!
- eska 6y agoI pasted Japanese text and it turned into Mojibake.
- usamaejaz 6y agoLooks like the encoding can be improved
- StavrosK 6y agoI use https://www.pastery.net/ https://www.pastery.net/, which I think is the best pastebin (because I made it the way I wanted it). Private, no ads, no hassle, and the best part is the editor integration. Highlight some code, press F2, and the paste URL is in your clipboard. I love it so much, and everyone that has used it likes it too, so I'm really happy about all this.
- webwanderings 6y ago> Everything goes over an encrypted TLS connection, so nobody other than the intended recipient (and us. And probably CloudFlare, and maybe Google. But that's it.) can see what you're pasting. This is funny. Liked the sense of humor over the irony. :) It does look pretty.
- StavrosK 6y agoThank you!
- spdustin 6y agoLovely pastebin you made there! One nit to pick: “With a default expiration time of one day” But the default expiration time was one month when I clicked the button to create a new paste. Nice work, though!
- StavrosK 6y agoOops, I changed that because a day was too short and forgot the docs, thanks!
- anonfunction 6y agoWhat mechanism actually removes the content? I didn't see that in the lua or repo.
- StavrosK 6y ago
- jooize 6y agoCan a pastebin client fit and function as a data: URI bookmarklet, and would it enable zero trust of web host?
- cwmartin 6y agoI found this recently https://topaz.github.io/paste/ https://topaz.github.io/paste/ where the entirety of the paste is stored base64 encoded in the URL.
- quickthrower2 6y agoUsing nginx.conf to host this looks like a great way to get around organisational boundaries to deploy applications you are not allowed to. "Well I'm just doing a quick config change, updating the nginx.conf sir..."