Skip to content

Instantly share code, notes, and snippets.

View rocapp's full-sized avatar
😶‍🌫️

Robbie Capps rocapp

😶‍🌫️
View GitHub Profile
@rocapp
rocapp / readme.md
Created July 27, 2025 01:13 — forked from johnidm/readme.md
Basic Real-Time Applications with WebSockets and FastAPI

Install dependencies - pip install fastapi 'uvicorn[standard]'

Run the example - uvicorn main:app --host 0.0.0.0 --port 8000

Access multiple pages from http://localhost:8000/ and send messages

Source code files

main.py

@rocapp
rocapp / vm-profile.nix
Created June 15, 2025 16:33 — forked from joshleecreates/vm-profile.nix
NixOS VM Profile
{ config, pkgs, modulesPath, lib, system, ... }:
{
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
config = {
#Provide a default hostname
networking.hostName = lib.mkDefault "base";
@rocapp
rocapp / list-fftabs.py
Created November 5, 2024 22:22 — forked from tmonjalo/list-fftabs.py
List all Firefox tabs with title and URL
#! /usr/bin/env python3
"""
List all Firefox tabs with title and URL
Supported input: json or jsonlz4 recovery files
Default output: title (URL)
Output format can be specified as argument
"""

How to Install PostgreSQL Using cloud-init

cloud-init allows customising and configuring deployed server instances on most popular cloud service providers easily without requiring the use of other related tools like Ansible. Since cloud-init is such a reliable tool, this brief write-up will document the exact steps and procedures to install and setup PostgreSQL on a Debian 12 (Bookworm) server instance.

Get the Key ID From the Public Key

wget -qO- https://www.postgresql.org/media/keys/ACCC4CF8.asc \
  | gpg --with-fingerprint --with-colons \
  | awk -F: '/^fpr/ { print $10 }'
@rocapp
rocapp / bigchalice.py
Created August 24, 2023 16:22 — forked from RogerWebb/bigchalice.py
Deploy AWS Chalice Project via Docker and Serverless Application Model
import boto3, json, os, shutil, subprocess
from argparse import ArgumentParser
"""
Big Chalice Deployer deployes Chalice Apps using the "chalice package ..." command and
modifies the resulting sam.json template to make use of the Docker deployment process
instead of the default, s3 based, process. Additionally, the ability to delete the
resulting SAM App is available via the CLI.
Usage:
@rocapp
rocapp / instructions.md
Last active August 29, 2015 14:25 — forked from cmheisel/instructions.md
Kabbage Code Sample

User story

As a Kabbage developer, I want to see how you code a lightweight application, so that I can get a feel for a your skills and strengths.

Acceptance Criteria:

  1. Given a user, when they access your application, then they should be presented with a search box prompting them for a topic
  2. Given a user, when they enter a topic, results from Twitter should be returned
  3. Given a user, when they enter a topic, results from Wikipedia should be returned
  4. Given a user who's performed a search, when they hit the browser's refresh button, results should be refreshed under the same search criteria.