Skip to content

Instantly share code, notes, and snippets.

@sabatale
sabatale / README.md
Last active June 14, 2021 21:51 — forked from lovromazgon/README.md
Schedule starting/stopping a CloudSQL instance on GCP

To use this cloud function follow these steps:

  1. Create a pub/sub topic which will be used to trigger the cloud function.
  2. Create the cloud function and copy in the code below.
    1. Set the trigger to Pub/Sub and choose the topic created in step 1.
    2. Set the Runtime to Python 3.9 and delete default files.
    3. Create each file manually and paste the code.
    4. Make sure to set the correct project ID in line 8.
  3. Create a cloud scheduler job to trigger the cloud function on a regular basis.
    1. Choose the frequency when you want the cloud function to be triggered.
  4. Set the target to Pub/Sub and define the topic created in step 1.
@sabatale
sabatale / montreal-fsa-polygons.geojson
Created March 15, 2021 23:59
Geojson with postal codes FSA polygons for Montréal, QC, Canada.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.