Skip to content

Instantly share code, notes, and snippets.

View rotimi-best's full-sized avatar
👨‍💻
Inventing the future

Rotimi Best rotimi-best

👨‍💻
Inventing the future
View GitHub Profile
Hey there, how's it going? This is not an AI video. Prayer 2026W, 99% of the internet's content usually falls into these three pillars, which is text, images, and video. Now, there's some other stuff out there like 3D rendering, uh but this is what you see usually. Now, text is super easy. You just write HTML code and you can pretty much host it anywhere. Images can be a bit trickier because you need to do some optimizations and maybe serve up different sizes for uh different devices. Uh but that's also relatively easy to do and there's many providers out there that do it relatively cheap as well. Video on the other hand was historically a bit more difficult uh to host, but also to create encodings and create different qualities depending uh how the network uh is for that specific user that views your content. So, if you're interested in hosting large amounts of video content, whether that's on the course platform or exclusive videos like Corridor Crew has, for example, here's a really good way to do it. Befo

Packaging Supabase with Docker Compose

Created: 07/08/2025, 20:18:00 Last Updated: 07/08/2025, 20:28:56

User

If you look at the README of my project, we use supabase https://github.com/classroomio/classroomio/files/README.md for our database however when we want to package our software it's hard to package supabase because it has its own docker compose file and several steps to selfhosting.

Here is our docker compose file https://github.com/classroomio/classroomio/files/docker-compose.yaml

@rotimi-best
rotimi-best / DockerfileForSvelteKit.md
Created September 18, 2024 15:31 — forked from aradalvand/DockerfileForSvelteKit.md
Dockerfile and .dockerignore for SvelteKit:

*This Dockerfile is intended for SvelteKit applications that use adapter-node. So, the Dockerfile below assumes that you have already installed and configured the adapter.

Dockerfile:

FROM node:18-alpine AS builder
WORKDIR /app
COPY package*.json .
RUN npm ci
COPY . .
RUN npm run build
@rotimi-best
rotimi-best / sql
Last active June 7, 2024 17:39
get_explore_courses.sql
drop function if exists public.get_explore_courses (uuid, uuid);
create
or replace function public.get_explore_courses (org_id_arg uuid, profile_id_arg uuid) returns table (
id uuid,
org_id uuid,
title character varying,
slug character varying,
description character varying,
@rotimi-best
rotimi-best / load_setup.ts
Created April 2, 2024 11:32
Load function for TS file of /setup page
import get from 'lodash/get';
async function getGenericData(orgSlug: string): Promise<{ isCoursePublished: boolean; isCourseCreated: boolean; orgHasAvatarUrl: boolean}> {
const { data } = await supabase.from('course').select(`
id,
is_published,
group:group_id!inner(
organization!inner (
avatar_url,
siteName
@rotimi-best
rotimi-best / create_service_cache.sh
Last active October 31, 2023 07:45
Script that generates a cache.ts file for any service
#!/bin/bash
# Service name for the TypeScript file.
service_name="$1"
file_name="cache.ts"
# Code content to write to the file.
code="import { revalidateTag } from \"next/cache\";
interface RevalidateProps {
@rotimi-best
rotimi-best / .svelte
Created October 20, 2023 16:36
Horizontal Scroll of Students
<script>
let name = 'world';
const students = [
{ avatarUrl: 'https://images.unsplash.com/photo-1599566150163-29194dcaad36?auto=format&fit=crop&q=60&w=800&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8NHx8YXZhdGFyc3xlbnwwfHwwfHx8Mg%3D%3D', name: 'Ifeanyi' },
{ avatarUrl: 'https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?auto=format&fit=crop&q=60&w=800&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8OHx8YXZhdGFyc3xlbnwwfHwwfHx8Mg%3D%3D', name: 'John' },
{ avatarUrl: '', name: 'Tunji' },
{ avatarUrl: '', name: 'Trump' },
{ avatarUrl: '', name: 'Buhari' },
]
@rotimi-best
rotimi-best / git.md
Created September 30, 2021 09:34
How we work using Git

Git commands

0. Создание / клонирование / добавление репозитория

Клонирование ропозитория:

hg clone https://[email protected]/someRepo/projectName

Инициализация локального репозитория:

@rotimi-best
rotimi-best / index.html
Created June 2, 2021 13:29
Questionnaire Builder
<div id="root"></div>
@rotimi-best
rotimi-best / react-folder-structure.md
Last active April 8, 2021 02:18
An opinionated folder structure for my react applications
root/
├── __test__/
├── public/
├── .storybook/
│   ├──stories/
│   │   ├── NextButton/
│   │   │   └── NextButton.stories.js
│   │   └── RadioButton/