Skip to content

Instantly share code, notes, and snippets.

View G-Goldstein's full-sized avatar

Graham Goldstein G-Goldstein

View GitHub Profile
@G-Goldstein
G-Goldstein / TGO_TermsOfService.md
Last active March 17, 2023 16:32
The Great Outdoors Terms of Service

Last updated: March 17, 2023

Please read these Terms of Service ("Terms") carefully before downloading, accessing, or using The Great Outdoors mobile game ("the Game") developed by Graham Goldstein, operating as Dragon Megaliths ("we," "us," or "our"). These Terms govern your use of the Game and constitute a legally binding agreement between you and us.

By downloading, accessing, or using the Game, you acknowledge that you have read, understood, and agree to be bound by these Terms. If you do not agree to these Terms, please do not use the Game.

License Grant

We grant you a limited, non-exclusive, non-transferable, revocable license to download, access, and use the Game for personal, non-commercial purposes on compatible devices that you own or control, subject to your compliance with these Terms.

@G-Goldstein
G-Goldstein / TGO_PrivacyPolicy.md
Last active March 17, 2023 16:31
The Great Outdoors Privacy Policy

Last updated: March 17, 2023

This Privacy Policy describes how your personal information is collected, used, and shared when you use or access The Great Outdoors mobile game ("the Game") developed by Graham Goldstein, operating as Dragon Megaliths ("we," "us," or "our").

Please read this Privacy Policy carefully before using the Game. By downloading, accessing, or using the Game, you acknowledge that you have read, understood, and agree to be bound by this Privacy Policy. If you do not agree to this Privacy Policy, please do not use the Game.

Information We Collect

We collect and use limited information when you play the Game, and we do not collect any personally identifiable information. The information we collect includes:

FROM python:3.7
RUN pip install flask
RUN useradd api -m
# Set our current directory, so that we're not installing into /
WORKDIR /home/api/
# Change to the 'api' user now, to reduce permissions for security
@G-Goldstein
G-Goldstein / docker_dojo_2_cheat_sheet.md
Last active March 1, 2019 13:58
Docker Dojo session 2

Main process, and container lifecycle

https://hub.docker.com/_/busybox

For busybox, the default execution is sh. So, after using run, we find ourselves in a shell environment:

docker run -it busybox

But we can specify an alternate command to run in the busybox container by appending it to the Docker run command:

@G-Goldstein
G-Goldstein / docker_dojo_1_cheat_sheet.md
Last active February 8, 2019 16:48
Docker Dojo 1 Cheat Sheet

Terminology

A Docker image is a template for an application, together with its dependencies, runtime environment and metadata.

A Docker container is a running instance of a Docker image.

Commands

Use command docker alone to see Docker usage. You may need root access.

-- Begin lines with two dashes to have the SQL engine ignore them. Great for comments or for storing an old line of code that you might want to use again later.
-- IBM i command STRSQL enters interactive SQL, from which you can run SQL statements.
-- The SOFPACK table stores information about software packages.
-- In SQL, use SELECT to query tables.
-- The * here is a wildcard meaning all columns.
SELECT * FROM sofpack
import pyVmomi # Use the pyVmomi module we downloaded
import pyVim.connect
import ssl # Use the ssl module from the standard library to avoid certification here.
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
context.verify_mode = ssl.CERT_NONE
host='???' ## Ask another team member for these credentials, or use your own!
user = '???' ## Be careful about uploading credentials to public source repositories!
password = '???'
def all_possible_ips():
for number in range(10, 255):
yield '172.31.32.' + str(number)
def all_available_ips(unavailable):
for ip in all_possible_ips():
if ip not in unavailable:
yield ip
#########################################################
def all_possible_ips():
for number in range(255):
yield '172.31.32.' + str(number)
#########################################################
import unittest
class SaunaTests(unittest.TestCase):
# Lists
numbers = [3, 5, 7, 4, 2]
## Don't worry about remembering the syntax, as long as you can refer back to an example.
print(numbers)
print(max(numbers))