Skip to content

Instantly share code, notes, and snippets.

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.
@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.
@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 / fear-index-vs-btc-price-vs-eth-price-api-data.markdown
Created February 15, 2022 14:52
Fear Index vs. BTC price vs. ETH price (API data)
@sabatale
sabatale / wayback_save_api.gs
Last active April 18, 2022 20:01
Wayback machine - Automatic save with Google Scripts
function wayback() {
var url = 'https://www.google.com/';
// Does it already exist?
var archive = JSON.parse(getContent_('https://archive.org/wayback/available?url=' + url, {}));
if (archive) {
var closest = archive.archived_snapshots.closest;
if (closest && closest.available) {
console.log(closest.url); // Yes? Here is the saved page URL.
} else {
@sabatale
sabatale / findProvinceCA.js
Last active September 12, 2022 01:33
Guess the province & sales taxes from any given postal code (Canada)
// A very simple example (sales taxes from 2022)
function findProvince(input) {
// Starting postal code character - https://www150.statcan.gc.ca/n1/pub/92-195-x/2011001/other-autre/pc-cp/tbl/tbl9-eng.htm
// Provinces short codes - https://www150.statcan.gc.ca/n1/pub/92-195-x/2011001/geo/prov/tbl/tbl8-eng.htm
// Sales taxes by province - https://www.retailcouncil.org/resources/quick-facts/sales-tax-rates-by-province/
//var input = "H2V 1V8";
var postal = input.substring(0, 1).toLowerCase(); // E.g., "H2V 1V8" becomes "h"
@sabatale
sabatale / briefed_in_investor_list.json
Created December 4, 2023 04:28
briefed.in - Investor List for Canada (12-2023)
This file has been truncated, but you can view the full file.
[
{
"type": "investor",
"id": 3074,
"attributes": {
"id": 3074,
"investorName": "BKR Capital",
"investorType": [
"Venture Capital"
],
@sabatale
sabatale / briefed_in_company_list.json
Created December 4, 2023 04:36
briefed.in - Company List for Canada (12-2023)
This file has been truncated, but you can view the full file.
[
{
"type": "company",
"id": 2476,
"attributes": {
"id": 2476,
"companyName": " mosea technologies",
"headquarters": "Toronto",
"ecosystemName": "Toronto",
"ecosystemSecondary": null,
@sabatale
sabatale / briefed_in_reports.json
Created December 4, 2023 04:38
briefed.in - Reports (12-2023)
{
"type": "summary",
"id": "summary",
"attributes": {
"ecosystems": [
{
"id": 531,
"ecosystemName": "Canada",
"year": "2023",
"amount": 5522005820,