Skip to content

Instantly share code, notes, and snippets.

View tebba-von-mathenstein's full-sized avatar

Tyler Bettilyon tebba-von-mathenstein

View GitHub Profile
@tebba-von-mathenstein
tebba-von-mathenstein / explore-dns-part-two.md
Last active January 18, 2021 19:28
An exercise to help you explore DNS and dig.

Explore DNS With Dig

In this exercise you'll learn about DNS by using dig to make DNS queries. These are the primary objectives of this exercise:

  • Expose the different responsibilities of different members of the DNS hierarchy.
  • Explore how different DNS servers respond differently to different DNS queries.
  • Familiarize yourself with the different kinds of DNS record types, and distinguish between them.

dig is a command line tool that comes installed on most unix and linux systems, or can be installed with your favorite package manager. If not, you can use this web interface -- but the user experience is much worse so I strongly suggest you use the command line instead.

@tebba-von-mathenstein
tebba-von-mathenstein / auto_engineer_image.py
Created March 30, 2024 17:59
A simple AI Prompt Engineering example with OpenAI
from openai import OpenAI
# Your API key must be saved in an env variable for this to work.
client = OpenAI()
# Get a prompt, embed it into a classification request to GPT
image_subject = input("Subject: ")
image_setting = input("Setting: ")
image_style = input("Style: ")