I’ve come across the following issue a handful of times when building new web apps hosted on Heroku: I want a custom domain, and I want a simple way to force a http → https redirect.

If you set up a custom URL on Heroku for your Django app and you pay for hobby or higher dynos (SSL is not available on the free level), then follow the below step to enable a redirect from insecure http requests to secure https requests.

From within your Django app, add the following to your settings.py file:

# SecurityMiddleware must be listed before other middleware
# ...

That’s it! Push your app to Heroku and confirm that http requests now redirect to https.

Often when working on a non-production project locally I will decide I want to use it remotely on an EC2 instance. Maybe it’s a daily cron job, python scraping scripts, or even backtests running on a model that I would like to be hosted remotely. Whatever the purpose, I usually want a quick way to set up a remote .git repository on my EC2 instance that I can push to, and the following are the steps you can take to get that up and running too. …

Continuing the theme of publishing quick and dirty scripts I use, this is a script for when I need to check the status of a bunch of URLs without overthinking it.

import requests
def get_url_status(urls): # checks status for each url in list urls

for url in urls:
r = requests.get(url)
print(url + "\tStatus: " + str(r.status_code))
except Exception as e:
print(url + "\tNA FAILED TO CONNECT\t" + str(e))
return None
def main():

urls = ["https://www.foundryoutdoors.com"]
if __name__ == "__main__":

Simply save the script, replace my urls Python list with your own, open terminal, cd into the…

Periodically I run into the issue where I need to create a lot (thousands) of URLs from random strings of text, which may or may not include capital letters, spaces, hyphens, brackets, commas, etc.

Sometimes this is easiest done in a spreadsheet, so here’s an Excel function I baked up a couple years ago that I use to solve the particular problem of slugifying/handle-izing those URLs. It’s clunky, but functional*. Just replace “A2” with whatever cell you need to slugify, and voila.

*Only works for ASCII characters. Does not check for collisions!


For example, the text

AS dsf a s1111#$ b'lue p"urple AsdoIj



when slugified.

The Function


Something I’ve come across (part of a larger problem with Shopify filtering) that was affecting my organic traffic was users landing on filtered collection pages with a different URL than the main collection page itself (the one I want to rank).

For example, if you see users landing on www.yourstore.com/collections/hats/color_blue instead of www.yourstore.com/collections/hats because for some reason the color_blue filtered version of that collection ranks better on Google, this might help you point the traffic in the right direction. This will also set the canonical URL for paginated collections to the main collection.url for URLs with ?page=2 and beyond. …

WeWork, the self-described “platform for creators”, just announced a $355 million Series A, giving it at a $5 billion valuation and rocketing it up to the #10 spot in the Wall Street Journal’s Billion-Dollar Startup Club list. WeWork’s product is co-working space for small businesses. The spaces are generally in buildings renovated to provide modern, trendy working environments for young start-ups and freelance workers at a cost accessible to them.

Full disclosure — I’ve been a member/tenant of the WeWork SoHo West location in downtown Manhattan for the past 6 months trying to grow the company I founded, FoundryOutdoors.com. …

A word you hear a lot in the same sentence as funding, revenues, or dollars is “million. It’s not large from a strictly mathematical or cosmological perspective, but arguably large from a conceptual one. I have a hard time visualizing even a few thousand of anything, so a mental trick for reframing large quantities is helpful for me in understanding such things. I’d argue that’s important for just about anything being dealt with at scale — if nothing else but for the sake of grasping the gravity of the numbers being discussed.

What does 1,000,000 look like?

To visualize a…

Eli Williams

Founder, Foundry Outdoors l www.foundryoutdoors.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store