Skip to content

Instantly share code, notes, and snippets.

View Oluwasetemi's full-sized avatar
🏠
Working from home

Oluwasetemi Ojo Oluwasetemi

🏠
Working from home
View GitHub Profile
@Oluwasetemi
Oluwasetemi / vite-plugin-content-assets.ts
Created August 25, 2025 20:49
Sample vite plugin for asset management
import type { Plugin } from "vite";
import fs from "node:fs";
import path from "node:path";
export function contentAssetsPlugin(): Plugin {
return {
name: "content-assets",
configureServer(server) {
// Serve images from content directory
Uncaught Error: can't access property "compileAG", n is null
Ei@https://react.oluwasetemi.dev/assets/modules/shiki-Cx6-teRe.js:2:4914
hl@https://react.oluwasetemi.dev/assets/modules/shiki-Cx6-teRe.js:2:4278
gl@https://react.oluwasetemi.dev/assets/modules/shiki-Cx6-teRe.js:2:3984
d@https://react.oluwasetemi.dev/assets/modules/shiki-Cx6-teRe.js:2:1860
Si@https://react.oluwasetemi.dev/assets/modules/shiki-Cx6-teRe.js:2:1813
_tokenize@https://react.oluwasetemi.dev/assets/modules/shiki-Cx6-teRe.js:3:127
tokenizeLine2@https://react.oluwasetemi.dev/assets/modules/shiki-Cx6-teRe.js:2:8786
tokenize@https://react.oluwasetemi.dev/assets/modules/shiki-Cx6-teRe.js:147:22292
@Oluwasetemi
Oluwasetemi / Nixpack.log
Last active July 14, 2025 12:53
Build Logs
11:42:38 am Initializing build 🏗️
11:42:38 am
11:42:38 am ╔══════════════════════════════ Nixpacks v1.37.0 ══════════════════════════════╗
11:42:38 am ║ setup │ nodejs_18, npm-9_x ║
11:42:38 am ║──────────────────────────────────────────────────────────────────────────────║
11:42:39 am ║ caddy │ pkgs: caddy ║
11:42:39 am ║ │ cmds: caddy fmt --overwrite /assets/Caddyfile ║
11:42:39 am ║──────────────────────────────────────────────────────────────────────────────║
11:42:39 am ║ install │ npm ci ║
11:42:39 am ║──────────────────────────────────────────────────────────────────────────────║
// Run this command to generate base config and vs code settings:
// pnpm dlx @antfu/eslint-config@latest
import antfu from "@antfu/eslint-config";
export default antfu({
type: "app",
typescript: true,
formatters: true,
stylistic: {
/* eslint-disable node/no-process-env */
import type { ZodObject, ZodRawShape } from "zod";
import { ZodError } from "zod";
export default function tryParseEnv<T extends ZodRawShape>(
EnvSchema: ZodObject<T>,
buildEnv: Record<string, string | undefined> = process.env,
) {
try {
@Oluwasetemi
Oluwasetemi / index.css
Last active January 11, 2025 00:07
Code used during Tinyuka CSS Teaching
/*
CSS Reset
*/
/* 1. Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
box-sizing: border-box;
}

Tripleten Test Assignment

React App

1. Do the components render correctly? If not, what's wrong in the code?

Yes to some extent, the components render correctly but there are some issues in the code that need to be addressed:

The signup and signin page are not working due to the API not returning data.

@Oluwasetemi
Oluwasetemi / index.css
Created September 28, 2024 18:08
Testing modules Karatu Frontend
body {
background-color: #f0f0f0;
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
body h1 {
background-color: #333;
color: #fff;
@Oluwasetemi
Oluwasetemi / intro.js
Created August 17, 2024 21:02
First JS live class with AltSchool v4 student
// variables and data types - number, string, boolean, null , undefined
// var, let, const
// declare a variable (identifier)
// var name;
let principal = 'Adedeji'; // string `, ", '
// interpolation - ${}
let address = `
1, Oluwaseyi Street,
Ojodu Berger,
@Oluwasetemi
Oluwasetemi / absolute-import-codemod-transform.js
Created July 28, 2024 22:16 — forked from phenax/absolute-import-codemod-transform.js
Codemod transform to convert all relative paths to absolute import paths inside src
const path = require('path');
const SOURCE = 'src';
const SOURCE_PATH = path.resolve(SOURCE) + '/';
const removeSourceDirName = path =>
path.replace(new RegExp(`^${SOURCE}\/?`, 'gi'), '');