Nicolas Mesa

Dad, husband, geek

How to Access Logged Objects in the Javascript Console

In this short post, we go through the process of making a console.logged Object available in Chrome’s javascript console. TLDR Right-click the Object you want to inspect and click Store as global variable. This creates a variable with name temp<n> where <n> is a number (starts from 1). Use the variable to access the Object. Explanation The Hack Version Sometimes when I’m debugging, I need to access an Object and its methods from the Javascript console. Read more →

Serve Your Current Directory With Python and HTTP

This is going to be a short post showing how to run an HTTP server to serve your current working directory. TLDR For Python 3 run: python3 -m http.server For Python 2 run: python -m SimpleHTTPServer .bashrc alias: alias serve="python3 -m http.server" Explanation Sometimes at work, I’ve had the need to spin up a quick HTTP server to serve my current working directory. I usually need this for two use cases: Read more →