Skip to content

Instantly share code, notes, and snippets.

View gwbischof's full-sized avatar
🧐
Learning

Garrett Bischof gwbischof

🧐
Learning
View GitHub Profile
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# I did this setup on nslskafka01, with the user consumer.
# Create a new user
useradd consumer
# Update consumer password to uuid4
passwd consumer
# Install conda.
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
set expandtab
set number
set cursorline
set incsearch
set hlsearch
highlight RedundantSpaces ctermbg=red guibg=red
match RedundantSpaces /\s\+$/
autocmd BufWritePre * :%s/\s\+$//e
set tabstop=4 softtabstop=0 expandtab shiftwidth=4
"""
This serves a directory of static files.
It also tells you what files are available for a run.
"""
from fastapi import FastAPI
from fastapi.staticfiles import StaticFiles
import os
@gwbischof
gwbischof / BlueskyDatabrokerPackServer.py
Last active February 8, 2021 17:37
BlueskyDatabrokerPackServer
"""
This builds and serves databroker-pack files
"""
import asyncio
import os
import pathlib
import subprocess
import tempfile
import zipfile
@gwbischof
gwbischof / mongo_backup_cron.txt
Last active February 22, 2021 20:43
mongo_backup_cron
#!/bin/bash
# ------------------------------------------------------------------
# Simple Backup Script for MongoDB
# ------------------------------------------------------------------
# Definitions
MONGO_HOST='localhost'
MONGO_PORT="27017"
DUMP_PATH='/backup/mongo_backup'
DAYS_OF_BACKUPS=2
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.