Skip to content

Instantly share code, notes, and snippets.

View thomaslillo's full-sized avatar
🌞

Thomas Lillo thomaslillo

🌞
View GitHub Profile
@ByteSizedMarius
ByteSizedMarius / ExtractSavedPlacesGMaps.md
Last active June 23, 2024 16:55
Google Maps: Extract places from shared list

Edit: This doesn't work for lists > 20 items, because pagination does not work. Please see here

This script allows extracting name and coordinates for gmaps shared lists. It is incredibly unstable and may break anytime. Good luck figuring out why, because the syntax is extremely confusing and basically makes no sense at all. Thanks to google for not providing an api for this after LITERALLY 12 YEARS

How to use this script:

  1. Share a list and open the link in a browser window. It will redirect. The new link will look like this: google.com/maps/@<your coords>/data=....
  2. Take the data-portion and paste it into the following link: https://google.com/maps/@/data=?ucbcb=1
@mgaitan
mgaitan / jsonl2csv.py
Last active July 22, 2021 22:53
Given a json line file, return same content in csv format
from pathlib import Path
import argparse
import jsonlines
import csv
def jsonl2csv(filepath, type_=None, include=None, exclude=None):
def valid_type(item):
if type_:
return item.get('_type') == type_
@vasanthk
vasanthk / System Design.md
Last active July 2, 2024 18:53
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@Kartones
Kartones / postgres-cheatsheet.md
Last active July 2, 2024 22:38
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)