In this video we are loading an older version of a Github repository in order to inspect the code at an earlier point.
Run a simple lightweight Python server
When you are developing websites you often run into the need to test them on a server environment, because browsers block websites with certain features from running locally.
Here is a really quick way to run such a website in a server environment using Python 3 (which you probably have already installed on your machine anyways).
- Open the command window where your website root folder is. One easy way of doing that is simply typing “cmd” in the Windows Explorer address bar.
- Type this command in the command window:
python -m http.server 8000
- Now simply go to http://127.0.0.1:8000/ in your browser.
If you are getting errors regarding script files with that simple version, you can also try this longer code:
python
#Use to create local host
import http.server
import socketserver
PORT = 1337
Handler = http.server.SimpleHTTPRequestHandler
Handler.extensions_map.update({
".js": "application/javascript",
});
httpd = socketserver.TCPServer(("", PORT), Handler)
httpd.serve_forever()
And open that with:
http://127.0.0.1:1337/
Increment number when creating multiple html elements using emmet
Sometimes you need to create many elements so that each one of them gets a unique, incrementing number. You probably already know about VS Code’s Emmet capabilities which let you type something like .myClass*5 to automatically create five divs with the class “myClass”. So the output of that would be:
Continue reading “Increment number when creating multiple html elements using emmet”Creating your first Python script in Blender
In this tutorial we take you through creating a python script that will perform the typical initial steps for setting up mirror-modifier based box modeling work:
Continue reading “Creating your first Python script in Blender”