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

seo

Search Engine Optimization

A checklist. SEO is about publishing unique content in user friendly way following W3.org recommendations!

mac

Edit Hosts File on Mac

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

mac

Bash or Zsh?

I need to switch shell forth and back because some python scripts depend on libraries installed on bash only, yet

  • Change to zsh: chsh -s /bin/zsh/
  • Change to bash: chsh -s /bin/bash/

Open new terminal afterwards.

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

Last Update: 12/14/2019 by khmuller