Copy-Paste Instructions for Optimal AI Interaction
⸻
I am [Your Name/Role], focused on:
| #!/bin/sh | |
| # Sending emails using Gmail and msmtp | |
| # Author: [Josef Jezek](http://about.me/josefjezek) | |
| # Donate: [Gittip](https://www.gittip.com/josefjezek) | |
| # Link: [Gist](https://gist.github.com/6194563) | |
| # Usage: setup-msmtp-for-gmail.sh | |
| sudo apt-get update -q | |
| sudo apt-get install msmtp-mta ca-certificates heirloom-mailx -yq |
| # I had a bit of trouble getting my unifi controller (hosted offsite) to use a proxy/letsencrypt. So here are the fruits of my labor. | |
| # The unifi default port is 8443 running on localhost. | |
| # License: CC0 (Public Domain) | |
| server { | |
| # SSL configuration | |
| # | |
| listen 443 ssl default_server; | |
| listen [::]:443 ssl default_server; |
| # An example to get the remaining rate limit using the Github GraphQL API. | |
| import requests | |
| headers = {"Authorization": "Bearer YOUR API KEY"} | |
| def run_query(query): # A simple function to use requests.post to make the API call. Note the json= section. | |
| request = requests.post('https://api.github.com/graphql', json={'query': query}, headers=headers) | |
| if request.status_code == 200: |
| # listen on port 80, and redirect to port 443 | |
| server { | |
| listen 10.0.0.131:80; | |
| server_name unifi01.int.unixathome.org; | |
| error_log /var/log/nginx-unifi01.int.unixathome.org.error.log info; | |
| access_log /var/log/nginx-unifi01.int.unixathome.org.access.log combined; |