This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- https://dba.stackexchange.com/questions/323851/add-foreign-key-constraint-to-existing-column-while-auto-generating-the-key-nam | |
alter table "Message" | |
-- drop the old constraint | |
drop constraint "Message_sender_fkey", | |
-- (re)add constraint but this time with cascading | |
add foreign key ("sender") references "Sender"("id") on delete cascade; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from os import getenv, makedirs, rename | |
from shutil import rmtree | |
import subprocess | |
from dotenv import load_dotenv | |
import requests | |
from typing import List | |
from pathlib import Path | |
from os.path import join | |
def get_github_repos(token: str) -> List[str]: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
from argparse import ArgumentParser | |
from os.path import basename | |
from pathlib import Path | |
from typing import List | |
TARGET_FILE = "/boot/efi/EFI/refind/refind.conf" | |
TARGET_TEXT = "default_selection Microsoft" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
. /etc/upstream-release/lsb-release | |
# pg admin | |
PGADMIN_URL="https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$DISTRIB_CODENAME" | |
curl -fsS https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo gpg --dearmor -o /usr/share/keyrings/packages-pgadmin-org.gpg --yes | |
sudo sh -c "echo \"deb [signed-by=/usr/share/keyrings/packages-pgadmin-org.gpg] $PGADMIN_URL pgadmin4 main\" > /etc/apt/sources.list.d/pgadmin4.list" | |
# vs code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://gauvain.pocentek.net/docs/raspbian-chroot/ | |
apt install schroot | |
echo \ | |
[jessie] \ | |
description=Raspbian armhf \ | |
directory=/var/chroot \ |