Skip to content

Instantly share code, notes, and snippets.

View aenglander's full-sized avatar

Adam Englander aenglander

View GitHub Profile

Keybase proof

I hereby claim:

  • I am aenglander on github.
  • I am aenglander (https://keybase.io/aenglander) on keybase.
  • I have a public key ASCvvDhvWcJI1BxKtIGTn6qlS2qceFP4Z7_7MGHGNUkz_go

To claim this, I am signing this object:

@aenglander
aenglander / htaccess_router.php
Created April 2, 2015 17:50
PHP .htaccess router for built in web server
<?php
if (file_exists($_SERVER['SCRIPT_FILENAME'])) {
return false;
}
$_SERVER['DOCUMENT_ROOT'] = empty($_SERVER['DOCUMENT_ROOT']) ? $_SERVER['PWD'] . '/www' : $_SERVER['DOCUMENT_ROOT'];
$htaccess = $_SERVER['DOCUMENT_ROOT'] . '/.htaccess';
$rewrites = array();
if (file_exists($htaccess)) {
$fp = fopen($htaccess, "r");
@aenglander
aenglander / main.py
Last active February 24, 2023 18:35
Example WSGI app and middleware for What the Heck is a WSGI Presentation
from io import BytesIO
from wsgiref.simple_server import make_server
def app(environ, start_response):
try:
content_length = int(environ["CONTENT_LENGTH"])
name = environ["wsgi.input"].read(content_length)
except (KeyError, ValueError):
name = b"World"
@aenglander
aenglander / auto-gpt-error-get-text-summary.txt
Created May 7, 2023 11:17
Auto-GPT error while attempting summarize a webpage
User: Determine which next command to use, and respond using the format specified above:
Assistant: {
"thoughts": {
"text": "I will use the 'get_text_summary' command to retrieve information on the most promising meme coins for short-term profitability from the CoinMarketCap website. I will also use the 'get_text_summary' command to retrieve information on the most promising meme coins for short-term profitability from the Crypto.com website.",
"reasoning": "Using the 'get_text_summary' command to retrieve information on the most promising meme coins for short-term profitability from the CoinMarketCap and Crypto.com websites will allow me to analyze the information and make data-driven decisions. This will help me identify the most promising meme coins for short-term profitability.",
"plan": "- Use the 'get_text_summary' command to retrieve information on the most promising meme coins for short-term profitability from the CoinMarketCap website\n- Use the 'get_text_summary' c