S
Seoffix.com
Sign In Get Pro Membership

Seoffix Community

CodeLearn

46 tracks and lessons. Open a card to preview the code here, then jump into the playground.

↗ Open CodeLearn
Seoffix Tech LabCodeLearn Lesson

PHP 8.2: Constant-Time Cryptographic Token Verification

Secure your API gateway against timing attacks using constant time hash comparisons and Bearer parsing.

#php#intermediate#codelearn
20 min · Intermediate · 25 XP
lesson.php
<?php
function verifyBearerToken(string $authHeader, string 
    // TODO: Extract Bearer token and verify hash usin
    return ["valid" => false];
}

$header = "Bearer sfx_live_99482abcdef0123456789";
$validHash = hash('sha256', "sfx_live_99482abcdef01234
Seoffix Tech LabCodeLearn Lesson

PHP 8.2: Streaming 50,000 URL XML Sitemaps with Zero Memory

Stream massive Google compliant XML sitemaps using XMLWriter to keep memory usage under 2MB.

#php#advanced#codelearn
25 min · Advanced · 25 XP
lesson.php
<?php
function generateSitemapXML(array $urls): string {
    $xml = new XMLWriter();
    $xml->openMemory();
    $xml->setIndent(true);

    // TODO: Write startDocument, startElement('urlset
Seoffix Tech LabCodeLearn Lesson

SQL: Advanced Window Functions for Domain Rank Slicing

Partition and rank millions of domains across top level domains using ROW NUMBER() and DENSE RANK().

#sql#intermediate#codelearn
20 min · Intermediate · 25 XP
lesson.sql
-- Given a table 'domains' with columns: domain, tld, 
-- TODO: Write a query selecting the top 2 ranked doma
SELECT
    domain,
    tld,
    global_rank
FROM (
    -- Your window function subquery here
Seoffix Tech LabCodeLearn Lesson

SQL: Composite Indexing for Sub-Millisecond Queries

Optimize multi million row backlink lookup tables from 2.5s down to 0.003s using Leftmost Prefix B Tree indexes.

#sql#advanced#codelearn
20 min · Advanced · 25 XP
lesson.sql
-- TODO: Write the CREATE INDEX statement for table 's
-- covering columns target_domain, status_code, and cr
CREATE INDEX ... ;
Seoffix Tech LabCodeLearn Lesson

HTML/CSS: Modern Glassmorphism Tool Card Component

Design an elegant dark mode glassmorphism card component with CSS backdrop filter and gradient borders.

#htmlcss#beginner#codelearn
15 min · Beginner · 25 XP
lesson.html
<div class="glass-card">
    <div class="icon">🚀</div>
    <h3>Speed Auditor</h3>
    <p>Benchmark Time to First Byte and Core Web Vital
</div>

<style>
.glass-card {
Seoffix Tech LabCodeLearn Lesson

TypeScript: Discriminated Unions for Type-Safe API Gateways

Model robust API results using TypeScript discriminated unions without optional field bugs.

#typescript#intermediate#codelearn
20 min · Intermediate · 25 XP
lesson.js
type ApiResponse<T> =
    | { status: 'success'; data: T }
    | { status: 'error'; message: string };

function handleResponse<T>(res: ApiResponse<T>): strin
    // TODO: Use switch(res.status) to return appropri
    return "";
}
Seoffix Tech LabCodeLearn Lesson

Hello, Python

Print a greeting using a variable.

#python#beginner#codelearn
15 min · Beginner · 20 XP
lesson.py
name = ""
# TODO: print "Hello, " followed by the name
Seoffix Tech LabCodeLearn Lesson

JavaScript Variables

let, const and template strings.

#javascript#beginner#codelearn
15 min · Beginner · 20 XP
lesson.js
const name = "Seoffix";
// TODO: log "Hello Seoffix" with a template string
Seoffix Tech LabCodeLearn Lesson

PHP 8 Intro

Typed functions and echo.

#php#beginner#codelearn
15 min · Beginner · 20 XP
lesson.php
<?php
// TODO: define greet(string $name): string and echo g
Seoffix Tech LabCodeLearn Lesson

Semantic HTML

Use landmark elements.

#htmlcss#beginner#codelearn
15 min · Beginner · 20 XP
lesson.html
<!-- TODO: add header, main and footer -->
Seoffix Tech LabCodeLearn Lesson

React Components

Build a function component.

#react#intermediate#codelearn
15 min · Intermediate · 30 XP
lesson.js
export function Card(props) {
  // TODO: return a div that shows props.title
}
Seoffix Tech LabCodeLearn Lesson

Prompt Framing

Give role, context and format.

#prompt#intermediate#codelearn
15 min · Intermediate · 25 XP
lesson.js
# Write your prompt below
Seoffix Tech LabCodeLearn Lesson

Git: Init and Commit

Start a repository and save work.

#shell#beginner#codelearn
15 min · Beginner · 20 XP
lesson.js
# Write your commands below
Seoffix Tech LabCodeLearn Lesson

Big O and Counting Work

Compare a loop with a lookup.

#python#intermediate#codelearn
15 min · Intermediate · 30 XP
lesson.py
def has_value(items, target):
    # TODO: use a set
    pass

print(has_value([1, 2, 3], 2))
Seoffix Tech LabCodeLearn Lesson

Conditions and Loops

Branch with if and repeat with for.

#python#beginner#codelearn
15 min · Beginner · 25 XP
lesson.py
for i in range(5):
    # TODO: print i only when it is even
    pass
Seoffix Tech LabCodeLearn Lesson

JavaScript Functions

Write a small pure function.

#javascript#beginner#codelearn
15 min · Beginner · 25 XP
lesson.js
function sum(a, b) {
  // TODO: return the total
}
console.log(sum(2, 3));
Seoffix Tech LabCodeLearn Lesson

PHP Arrays and Loops

Loop over an array.

#php#beginner#codelearn
15 min · Beginner · 25 XP
lesson.php
<?php
$colors = ["red", "green", "blue"];
// TODO: loop and echo each colour
Seoffix Tech LabCodeLearn Lesson

State with useState

Track a counter with state.

#react#intermediate#codelearn
15 min · Intermediate · 35 XP
lesson.js
import { useState } from "react";
export function Counter() {
  // TODO: add count state and a button
}