SIMAEC.NET WEB PUBLISHING

Tools and How To

A collection of tools, tips and hints. Useful not having to search for them over and over again.

git

Start Git Repository

Assuming git is installed and within PATH. If not, install Git

  • Create repository
    git init
  • Create .gitignore file to git repository root directory
  • Add all new files to repository
    git add .
  • Commit changes
    git commit -am "some unique commit comments"

gae

Command Line Deploy App

The command line statement below creates a new version of the app which then can be tested before replacing the version in production. replace [appid] with the corresponding app id. Execute from the local main app folder

sudo gcloud app deploy --project [appid] --no-promote

gae, python

Run App Locally

Within the main folder of the app. First, switch env and install libraries.

  • virtualenv -p python3 env
  • source env/bin/activate
  • pip install -r requirements.txt

Finally run app

  • python main.py

mac

Edit Hosts File on Mac

  • Use terminal/nano to edit the file [⌘ <Spacebar>] terminal
  • sudo nano /private/etc/hosts
  • sudo dscacheutil -flushcache

design

Web Site Design

Tired to look up these urls, used frequently while building web pages:

{'path': '/tools/', 'query': b'', 'referrer': None} - {'city': 'ashburn', 'region': 'va', 'country': 'US', 'latlang': '39.043757,-77.487442', 'ip': '18.232.38.214, 169.254.1.1', 'agent': 'CCBot/2.0 (https://commoncrawl.org/faq/)', 'uuid': None}