Skip to content

Instantly share code, notes, and snippets.

@htsh
htsh / README.md
Created April 4, 2024 21:39 — forked from disler/README.md
Use these Prompt Chains to build HIGH QUALITY AI Agents (Agentic Building Blocks)

Setup

  1. Create a new directory with these three files (requirements.txt, main.py, README.md)
  2. python -m venv venv
  3. source venv/bin/activate
  4. pip install -r requirements.txt
  5. python main.py
  6. Update main() to run the example prompt chains
@htsh
htsh / gist:32f349bdc7910341c8f823c1d7e98edd
Created November 27, 2023 14:51 — forked from levelsio/gist:5bc87fd1b1ffbf4a705047bebd9b4790
Secret of Monkey Island: Amsterdam (by @levelsio) or how to create your own ChatGPT image+text-based adventure game
# 2023-11-27 MIT LICENSE
Here's the open source version of my ChatGPT game MonkeyIslandAmsterdam.com.
It's an unofficial image+text-based adventure game edition of Monkey Island in Amsterdam, my home town.
Please use it however you want. It'd be nice to see more ChatGPT-based games appear from this. If you get inspired by it, please link back to my X https://x.com/levelsio or this Gist so more people can do the same!
Send me your ChatGPT text adventure game on X, I'd love to try it!
@htsh
htsh / gist:5900233
Created July 1, 2013 12:00
This is an excerpt from a Hacker News comment by user robomartin on hardening a 12.04LTS ubuntu install, related to the article "My First 5 Minutes On A Server; Or, Essential Security for Linux Servers" (link to comment: https://news.ycombinator.com/item?id=5319289 ). I'm putting this here as I'd like to evaluate the list when I get a chance.
How about it guys? Would you care to attempt to produce a canonical HN "How to harden your server" reference?
Maybe one of the security experts on HN can start a repository on Github to evolve a canonical script. I'm pretty much 100% Ubuntu 12.04 LTS, so it is my hope that this is one of the platforms that is addressed.
I did some looking around and this is what I found (I am in no position to evaluate the merits of any of these at anything
beyond an intermediate level):
https://github.com/bluedragonz/server-shield
https://github.com/eglimi/linux_hardening
http://www.cyberciti.biz/tips/linux-security.html
http://ubuntuforums.org/showthread.php?t=1002167
@htsh
htsh / gist:5796569
Created June 17, 2013 12:39
non-coffee version of user blakematrix's method to remove leading 'www''s from urls in express
app.get('/*', function(req, res, next) {
if (req.headers.host.match(/^www\./) != null) {
res.redirect("http://" + req.headers.host.slice(4) + req.url, 301);
} else {
next();
}
});