Skip to content

Instantly share code, notes, and snippets.

@sahilshahpatel
sahilshahpatel / 391OS-Deploy.md
Last active December 24, 2021 09:38
How to run your ECE 391 OS on GitHub Pages

Running your ECE 391 OS on GitHub Pages

This is a guide on how to run your ECE 391 OS via the browser. We will use the v86 library to do so. This guide assumes that your source code is on a private* GitHub repository.

* Please do not put your source code in a public repository. This can lead to academic integrity violations (for both visitors to your repository AND YOU)

Test that your OS will work with v86

You can use the v86 demo page to see what your OS will look like in the browser and test its compatibility with v86. Simply upload your mp3.img file (outputted by make) as the Hard Disk Drive and hit "Start Emulation".

To use the exact page and layout as the above page, you'll want to make v86 yourself (you can follow their instructions to do so). Another option is to copy the built files from the template below.

@branneman
branneman / better-nodejs-require-paths.md
Last active June 29, 2024 16:00
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions