Skip to content

Instantly share code, notes, and snippets.

View marko911's full-sized avatar

Marko Bilal marko911

View GitHub Profile
@marko911
marko911 / Postgres backup to Dropbox bash script
Last active June 5, 2024 19:26
This script backs up your database running in a docker container to your dropbox. It runs once every hour and manages cleanup on the local file system
# script.sh
CONTAINER_NAME="your_postgres_container"
DB_USERNAME="your_db_username"
DB_NAME=
TIMESTAMP=$(date +%Y-%m-%dT%H-%M-%S)
BACKUP_FILE="/tmp/${DB_NAME}-${TIMESTAMP}.db"
LOCAL_BACKUP_FILE="${DB_NAME}-${TIMESTAMP}.db"
DROPBOX_CLIENT_ID=
DROPBOX_CLIENT_SECRET=
// Code generated by Prisma Client Rust. DO NOT EDIT
pub static DATAMODEL_STR: &'static str =
include_str!("../prisma/schema.prisma");
static DATABASE_STR: &'static str = "postgresql";
pub async fn new_client() -> Result<PrismaClient, ::prisma_client_rust::NewClientError> {
PrismaClient::_builder().build().await
}
pub async fn new_client_with_url(
url: &str,

Keybase proof

I hereby claim:

  • I am marko911 on github.
  • I am mbilal (https://keybase.io/mbilal) on keybase.
  • I have a public key ASAJATwVe_d_84RTNgam7heM87kZIU6WZN9VanMJWPlP9Qo

To claim this, I am signing this object:

<dom-module id="gd-column">
<link rel="stylesheet" href="gd-column.css">
<template>
<style is="custom-style">
paper-item:hover {
background-color: rgba(158,158,158,0.2);
}
.flex {
@apply(--layout-flex);
}