Category: Tutorials and Learning

Recently at Hypatia Software Organization we decided to enhance the security of our servers by improving our HTTPS (encryption) support. Use of strong encryption enhances the privacy of our members, volunteers, donors, as well as the Hypatia community at large. In the past deploying strong HTTPS to a web-server was a costly and time-consuming process that required buying an X.509 certificate from a Certificate Authority (CA). This has changed with the creation of the Let’s Encrypt CA, a CA that provides cost free X.509 certificates via a public API, as well as Certbot a client that utilizes the this API to turn certificate generation into a simple process that anyone running a web-server can do!

Now that the basics are out of the way, lets get down to how to deploy Certbot on your web-server to obtain a cost free X.509 certificate for yourself! In this example we will be using FreeBSD 10.2-RELEASE using Nginx 1.8.1 as a web-server. The process is fairly simple and requires at least basic understanding of the shell. In the examples we provide we are using ZSH as our shell and the prompt will be denoted by a “%” character. Before you can get started you will need a valid domain name pointed to the server that you wish to obtain a certificate with. Additionally you will need to install git and python, you can install them with the following command:

% pkg install git python

Once you have the required packages, the rest is easy. First lets clone the Certbot repository from Github:

% git clone https://github.com/certbot/certbot.git

Now all that’s left to do is obtain our Certificate, Certbot will automatically install any system dependencies and create a Python Virtual Environment to manage any Python packages it requires. In this example we will be requesting a certificate for the following domains: example.com, www.example.com. This process will take several steps that will be noted with comments (Text after the “#” character):

And that’s it! You will now have a certificate in /etc/letsencrypt/live/example.com/, where example.com is the first domain listed in the above letsencrypt-auto command.

One more suggested security enchantment you can implement for your users is generating your own strong and unique Diffie-Hellman (DH) Key which is used for exchanging cryptographic keys between the client (web-browser) and server. This can easily be done with the following commands which will yield a 4096-bit DH key:

% cd /usr/local/etc/ssl/
% openssl dhparam -out dhparams.pem 4096

Now that you have a new X.509 certificate I’m sure you would like to deploy it to your web-server. Here is our basic Nginx configuration. We store it in a separate file and include it in our /usr/local/etc/nginx/nginx.conf file. By doing this it makes it easy to include the same settings and headers in all of our HTTPS virtual hosts. While this could be written a bit more clean we find it works very well. To include the common file, you will need to add the line “include ssl_common.conf;” to your configuration file, it should look something like this:

Now you should have HTTPS running with a certificate from the Let’s Encrypt CA! If you would like to test your server for configuration errors, I strongly recommend using https://ssllabs.com to test your server configuration. If you follow this guide and checked https://cipherli.st/ for any changes, you should get an A+ on SSLabs’ test. Good luck and happy hacking!

If you were to ask “What are the most difficult aspects of testing a game engine,” an answer you’d hear a lot is “rendering.” What things look like when they’re drawn to screen–how do you test that? Well, to know that things drawn to screen look right you need to compare the rendered image to an image you can expect to be static, unchanging. The first approach is to create an image test fixture of the expected render image and compare that against the render image itself. However, this approach is extremely limited. As unfortunate as is is, we must leave the domain of simple static tests, and enter into the wacky world of dynamically testing.

Recently my laptop started falling apart, and I needed a new device to continue my development work on Sappho, previously Hypatia Engine, as well as other development endeavours. I was looking into a replacement laptop, when I had a thought – what if I could develop everything I needed to from an iPad? After some careful thinking about the feasibility of it, I decided that I could probably do everything on one, and so I set about acquiring one. Thanks to Blake (a very generous HSO staff member), I got my hands on one.

Lillian Lemmer talks about testing and Test Driven Development (TDD) in Python at LeadPages (thanks, LeadPages!) about using py.test for testing Python code to assure software stability.

The example used for testing is a game where you eat sugary things until you lose all your enamel (effectively making enamel HP)! Lillian shows how the aforementioned is tested. The TDD part comes in when someone asks to show a Test Driven Development example where brushing your teeth restores enamel.

It’s about 20 minutes long, includes questions/comments from the crowd.

[youtube https://www.youtube.com/watch?v=dIIj3MRnGhs&w=560&h=315]

Here’s the repo being talked about in the video: https://github.com/LeadPages/tutorials

Hello, Lillian here! Wanna learn how to install FreeBSD, with a nice GUI, Firefox, a nice terminal experience, and other goodies? I had some spare time so I made an instructional video for exactly that!

The basics of writing tests in Python, as explained by a very tired and unprepared me (Lily Lemmer!). 😅

[youtube https://www.youtube.com/watch?v=1cRfMjz3Pxc]

I had just come back from vacation and forgotten I was to give a talk on this subject, so I was unprepared and a bit sick as you can hear from my voice, so please be forgiving. 😬 I’ll be doing this talk again, it should be a lot better! Keep a lookout!

Server-sent events efficiently sends data to clients in real-time and asynchronously. This particular setup was used for STATICFUZZ and shows you how to send an event from server/Python to client/JavaScript, plus setting up the server! This is about as full stack as it gets!

This past week we’ve begun automating our onboarding process by developing a chat bot for our team Slack. The bot messages new users with pre-written information which all users should be aware of, like relevant links (Code of Conduct, mentor calendar, etc.). We chose to use a Python implementation of the Slack API; Python is the standard language used at HSO.