Skip to content

Commit 55f6a2a

Browse files
committed
Updates
1 parent 2f0001b commit 55f6a2a

29 files changed

+463
-65
lines changed

404.html

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Redirecting...</title>
6+
<script type="text/javascript">
7+
// Single Page Apps for GitHub Pages
8+
// MIT License
9+
// https://github.com/rafgraph/spa-github-pages
10+
// This script takes the current URL and converts the path and query
11+
// string into just a query string, and then redirects the browser
12+
// to the new URL with the query string and hash fragment, but no
13+
// path, to load the single page app's index.html root.
14+
(function(){
15+
var redirect = sessionStorage.getItem('redirect');
16+
if (redirect) {
17+
sessionStorage.removeItem('redirect');
18+
window.location.replace(redirect);
19+
} else {
20+
var path = window.location.pathname;
21+
var query = window.location.search;
22+
var fragment = window.location.hash;
23+
var newUrl = window.location.protocol + '//' + window.location.hostname + (window.location.port ? ':' + window.location.port : '') + '/?' +
24+
(path.startsWith('/') ? path.substring(1) : path) + query + fragment;
25+
sessionStorage.setItem('redirect', newUrl);
26+
window.location.replace(newUrl);
27+
}
28+
})();
29+
</script>
30+
</head>
31+
<body>
32+
</body>
33+
</html>

CNAME

Lines changed: 0 additions & 1 deletion
This file was deleted.

asset-manifest.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"files": {
3-
"main.css": "/static/css/main.95d47f6e.css",
4-
"main.js": "/static/js/main.8be5d3e9.js",
3+
"main.css": "/static/css/main.8cf62888.css",
4+
"main.js": "/static/js/main.623cd110.js",
55
"static/js/453.33f95396.chunk.js": "/static/js/453.33f95396.chunk.js",
66
"index.html": "/index.html",
7-
"main.95d47f6e.css.map": "/static/css/main.95d47f6e.css.map",
8-
"main.8be5d3e9.js.map": "/static/js/main.8be5d3e9.js.map",
7+
"main.8cf62888.css.map": "/static/css/main.8cf62888.css.map",
8+
"main.623cd110.js.map": "/static/js/main.623cd110.js.map",
99
"453.33f95396.chunk.js.map": "/static/js/453.33f95396.chunk.js.map"
1010
},
1111
"entrypoints": [
12-
"static/css/main.95d47f6e.css",
13-
"static/js/main.8be5d3e9.js"
12+
"static/css/main.8cf62888.css",
13+
"static/js/main.623cd110.js"
1414
]
1515
}

data/shownPosts.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
[
2+
{
3+
"slug": "do-i-need-to-create-a-lib-for-that",
4+
"title": "Do I Need to Create a Lib For That?",
5+
"date": "2025-10-16",
6+
"updated": "2025-10-16",
7+
"description": "a journey to create my first golang package",
8+
"tags": ["go", "lib", "pkg.go.dev"]
9+
},
210
{
311
"slug": "warning-post",
412
"title": "My Second Post",

data/shownProjects.json

Lines changed: 71 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,93 @@
11
[
22
{
3-
"slug": "project-one",
4-
"title": "Project One",
3+
"slug": "bm",
4+
"title": "bm - bookmark manager",
55
"size": 2,
6-
"link": "https://example.com/project-one",
6+
"link": "https://github.com/fezcode/bm",
77
"pinned": true,
88
"isActive": true,
9-
"technologies": ["React", "Node.js", "MongoDB"]
9+
"technologies": ["Rust", "TOML"]
1010
},
1111
{
12-
"slug": "project-two",
13-
"title": "Project Two",
12+
"slug": "villain-couch",
13+
"title": "Villain Couch",
1414
"size": 1,
15-
"link": "https://example.com/project-two",
15+
"link": "https://github.com/fezcode/Villain-Couch",
1616
"pinned": true,
1717
"isActive": true,
18-
"technologies": ["Python", "Django", "PostgreSQL"]
18+
"technologies": ["VLC", "Go", "SQLite"]
1919
},
2020
{
21-
"slug": "project-three",
22-
"title": "Project Three",
21+
"slug": "doku",
22+
"title": "doku.js",
2323
"size": 1,
24-
"link": "https://example.com/project-three",
24+
"link": "https://github.com/fezcode/doku.js",
25+
"pinned": true,
26+
"isActive": true,
27+
"technologies": ["Node", "TUI", "npm"]
28+
},
29+
{
30+
"slug": "stroque",
31+
"title": "Stroque",
32+
"size": 1,
33+
"link": "https://github.com/fezcode/Stroque",
2534
"pinned": false,
2635
"isActive": true,
27-
"technologies": ["JavaScript", "HTML", "CSS"]
36+
"technologies": ["Rust", "SVG"]
37+
},
38+
{
39+
"slug": "go-tournament-brackets",
40+
"title": "Go Tournament Bracket Generator Lib",
41+
"size": 1,
42+
"link": "https://github.com/fezcode/go-tournament-brackets",
43+
"pinned": false,
44+
"isActive": true,
45+
"technologies": ["Go"]
46+
},
47+
{
48+
"slug": "scrappy",
49+
"title": "Scrappy.js",
50+
"size": 1,
51+
"link": "https://github.com/fezcode/scrappy",
52+
"pinned": false,
53+
"isActive": false,
54+
"technologies": ["JavaScript"]
2855
},
2956
{
30-
"slug": "project-four",
31-
"title": "Project 4",
57+
"slug": "open-tab-with-respect",
58+
"title": "Open Tab with Respect",
3259
"size": 2,
33-
"link": "https://example.com/project-three",
60+
"link": "https://github.com/fezcode/open-tab-with-respect",
3461
"pinned": false,
3562
"isActive": true,
36-
"technologies": ["JavaScript", "HTML", "CSS"]
63+
"technologies": ["WebExtension", "JavaScript", "Firefox", "HTML", "CSS"]
64+
},
65+
66+
{
67+
"slug": "clipboard-concat",
68+
"title": "Clipboard Concat",
69+
"size": 1,
70+
"link": "https://github.com/fezcode/clipboard-concat",
71+
"pinned": false,
72+
"isActive": false,
73+
"technologies": ["WebExtension", "JavaScript", "Firefox", "HTML", "CSS"]
74+
},
75+
{
76+
"slug": "boxer",
77+
"title": "Boxer",
78+
"size": 1,
79+
"link": "https://github.com/fezcode/boxer",
80+
"pinned": true,
81+
"isActive": false,
82+
"technologies": ["Linux", "C++", "C", "Ninja", "CMake", "Archiver"]
83+
},
84+
{
85+
"slug": "firefox-themes",
86+
"title": "Firefox Themes",
87+
"size": 1,
88+
"link": "https://github.com/fezcode",
89+
"pinned": false,
90+
"isActive": false,
91+
"technologies": ["WebExtension", "JavaScript", "Firefox", "HTML", "CSS"]
3792
}
3893
]

images/projects/doku-image.png

77.3 KB
Loading

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctype html><html lang="en" class="dark"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><link rel="icon" type="image/svg+xml" href="/favicon.svg"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="codex by fezcode..."/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Space+Mono:wght@400;700&display=swap" rel="stylesheet"><title>fezcodex</title><script defer="defer" src="/static/js/main.8be5d3e9.js"></script><link href="/static/css/main.95d47f6e.css" rel="stylesheet"></head><body class="bg-gray-950"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
1+
<!doctype html><html lang="en" class="dark"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><link rel="icon" type="image/svg+xml" href="/favicon.svg"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="codex by fezcode..."/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Space+Mono:wght@400;700&display=swap" rel="stylesheet"><title>fezcodex</title><script defer="defer" src="/static/js/main.623cd110.js"></script><link href="/static/css/main.8cf62888.css" rel="stylesheet"></head><body class="bg-gray-950"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Do I Need to Create a Lib For That?
2+
3+
## My Journey into Go Libraries
4+
5+
Creating my first Go library, [go-tournament-brackets](https://github.com/fezcode/go-tournament-brackets), has been a, _experience_...
6+
It's a project that allowed me to dive deep into Go's capabilities for building reusable and efficient code.
7+
The process of designing the data structures, handling edge cases like automatic bye calculations,
8+
and then building an interactive command-line interface on top of it was both challenging and immensely satisfying.
9+
There's a unique sense of accomplishment in seeing your code not just work, but also be easily consumable by others.
10+
11+
## About `go-tournament-brackets`
12+
13+
`go-tournament-brackets` is a versatile Go library designed for generating and managing single-elimination tournament brackets. It offers two primary components:
14+
15+
* **A Robust Go Library:** This provides a set of data models and functions that can be integrated into any Go application.
16+
It intelligently handles tournament logic, including the correct calculation of rounds, match-ups, and automatic byes for varying numbers of participants.
17+
* **An Interactive Command-Line Interface (CLI):** Built on top of the library, this CLI allows users to run a tournament from start to finish.
18+
You can input participant names, visualize the bracket in ASCII art, and interactively determine match winners until a champion is crowned.
19+
20+
This library aims to simplify the process of setting up and managing tournaments, whether you're integrating it into a larger application or running a quick tournament from your terminal.
21+
22+
## Ok, but why?
23+
24+
The inspiration for `go-tournament-brackets` struck during a casual phone call with a friend. I was unwinding, listening to [Morcheeba's "Easier Said than Done,"](https://www.youtube.com/watch?v=27lPAUdE1ys)
25+
when he posed a fun challenge: rank our favorite rappers. His idea was to create a bracket, share it, and play through it together. Simple enough, right?
26+
27+
Not quite. As he started looking for online bracket makers, we quickly hit a wall. Most platforms demanded sign-ups,
28+
locked away certain tournament types behind paywalls, and generally overcomplicated what should have been a straightforward,
29+
enjoyable activity. For something so simple, the hoops we had to jump through felt entirely unnecessary.
30+
That's when the idea sparked: why not build my own? A bracket maker that was free, flexible, and didn't force you into a convoluted user experience.
31+
And so, the seed for `go-tournament-brackets` was planted.
32+
33+
## How did I do that?
34+
35+
The journey from idea to a working library began with a deep dive into the mechanics of tournament brackets.
36+
I found myself poring over Wikipedia articles, unraveling the intricacies of single-elimination formats, byes, and seeding.
37+
Once I had a solid grasp of the theoretical underpinnings, I turned to my trusty collaborator, Gemini 2.5-Pro.
38+
39+
My first request to Gemini was simple: "Generate the necessary Go files for a tournament bracket library."
40+
It quickly scaffolded the basic project structure, providing the initial Go files. From there, I started defining the core data structures,
41+
translating the concepts from my research into Go structs. The `models.go` file, which you can see [here](https://raw.githubusercontent.com/fezcode/go-tournament-brackets/refs/heads/main/models.go), was born out of this phase.
42+
43+
```go
44+
// Tournament is the root object that contains all data for a tournament event.
45+
type Tournament struct {
46+
Name string
47+
Rounds []Round
48+
TournamentType TournamentType
49+
Options *Options
50+
}
51+
```
52+
53+
With the foundational structs in place, Gemini and I embarked on implementing the core logic.
54+
This was where the real challenge and fun began. Handling the "bye" mechanism – __ensuring that teams or competitors who automatically advance in the first round are correctly placed__ – proved to be particularly tricky.
55+
It's not as straightforward as it might seem, but with Gemini's assistance, we iterated through various approaches, and it did its best to help navigate those complexities. It was a true collaborative effort, pushing both my understanding and Gemini's capabilities to deliver a robust solution.
56+
57+
## Getting Your Go Module Out There!
58+
59+
So, you've built your awesome Go package, and now you want to share it with the world (or at least your fellow developers). Here's the lowdown on how to get your module published and discoverable:
60+
61+
1. **Your `go.mod` File is Key:**
62+
First things first, make sure your `go.mod` file has the right module path. This should usually point directly to your GitHub repo, like `module github.com/fezcode/go-tournament-brackets`. This is how Go knows where to find your cool new code!
63+
64+
2. **Tag It, You're It! (Creating a Release):**
65+
Go modules love Git tags for versioning. Think of a tag as a snapshot of a specific, stable version of your code.
66+
* **Tag your commit:** Use `git tag vX.Y.Z` (e.g., `git tag v0.1.0`). We highly recommend following Semantic Versioning (SemVer) – it makes life easier for everyone!
67+
* **Push that tag:** Don't forget to push your shiny new tag to GitHub: `git push origin vX.Y.Z`. This is what tells the Go module proxies that a new version exists.
68+
69+
3. **Letting Go Proxies Know (No, You Don't "Publish" It Directly):**
70+
Here's a cool part: Go module proxies (like `proxy.golang.org`) are pretty smart. They'll usually find your new module version automatically once you push that tag. You don't typically run a "publish" command.
71+
* **Want to nudge it?** If you're impatient (we get it!), you can explicitly ask a proxy to fetch your new version. For example, running `go get github.com/fezcode/go-tournament-brackets@v0.1.0` (or `go list -m ...`) from *any* Go project will make the proxy grab it if it hasn't already. This is more about *verifying* discovery than publishing.
72+
73+
4. **Patience, Young Padawan (Waiting for `pkg.go.dev`):**
74+
After your module is tagged and the proxies know about it, `pkg.go.dev` (Go's official package discovery site) will eventually list it. Just a heads-up: this isn't instant. It can take anywhere from a few minutes to a few hours for it to show up. So, grab a coffee, and it'll be there!

projects/bm.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
BM is a simple command-line bookmark manager for your shell. It stores bookmarks in a `store.toml` file within a `~/.bm` directory.
2+
---
3+
BM is a simple command-line bookmark manager for your shell. It stores bookmarks in a `store.toml` file within a `~/.bm` directory.
4+
5+
## Key Features:
6+
7+
* **Add Bookmarks:** Add the current directory or a specified directory/file to your bookmarks.
8+
* Options include `--add-anyway` (adds even if path doesn't exist), `--overwrite` (overwrites existing bookmarks), `--directory-only`, and `--file-only`.
9+
* **Show Bookmarks:** Display all bookmarks or a specific bookmark by name. Can be pretty-printed in a table format using `-p` or `--pretty`.
10+
* **Delete Bookmarks:** Remove a bookmark by its name.
11+
* **Help & Version:** Access help text and version information.
12+
* **Debug Mode:** Activate debug mode for any command to see additional prints.
13+
14+
## Usage Examples:
15+
16+
* `bm a HOME_DIR ~`: Add the home directory as `HOME_DIR`.
17+
* `cd $(bm s HOME_DIR)`: Change directory to the bookmarked `HOME_DIR`.
18+
* `bm s -p`: Show all bookmarks in a pretty table.
19+
* `bm d HOME_DIR`: Delete the `HOME_DIR` bookmark.
20+
21+
## Building & Packaging:
22+
23+
The project can be built using `cargo build` and run with `cargo run --package bm --bin bm`. Instructions are also provided for creating Debian (`cargo deb`) and RPM packages (`cargo generate-rpm`) with metadata configuration.

projects/boxer.txt

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
Boxer is a tool that creates archive files based on instructions provided in a `boxerfile`. It uses `CMake` and `Ninja` for its build system.
2+
---
3+
Boxer is a tool that creates archive files based on instructions provided in a `boxerfile`. It uses `CMake` and `Ninja` for its build system.
4+
5+
## Building:
6+
7+
To build Boxer, use `CMake` and `Ninja`. For the first time setup, run:
8+
```bash
9+
cmake -B build -GNinja
10+
ninja -C build
11+
```
12+
For subsequent compilations:
13+
```bash
14+
ninja -C build
15+
```
16+
17+
## Commands:
18+
19+
Boxer uses a `boxerfile` to define archiving operations with the following commands:
20+
21+
* **`ARCHIVE_NAME [NAME]`**: Sets the name of the archive, appending `.tar.gz`.
22+
* **`ADD_DIR [AS <OUTPUT_DIR>]`**: Adds a directory to the archive, optionally renaming it.
23+
* **`ADD_FILE [AS <OUTPUT_FILENAME>]`**: Adds a file to the archive, optionally renaming it.
24+
* **`ADD_FILE_MATCHING <REGEX> IN <DIR> GET <OPTION> [AS <OUTPUT_FILENAME>] TO <DEST_DIR>`**: Adds files matching a regular expression.
25+
* `<REGEX>`: Regular expression to match files.
26+
* `<DIR>`: Directory to search in.
27+
* `<OPTION>`: Specifies which matching files to add (`ALL`, `LATEST`, `FIRST`, `LAST`).
28+
* `<DEST_DIR>`: Destination directory within the archive.
29+
* `<OUTPUT_FILENAME>`: Optional, renames the matched file.
30+
31+
## Warnings:
32+
33+
Users should be cautious of leading `/` in archive filenames (when using `AS`).
34+
35+
## Tests:
36+
37+
Example `boxerfile`s are located in the `test-files` directory. To run tests, execute:
38+
```bash
39+
build/boxer -f test-files/.boxerfile
40+
```

0 commit comments

Comments
 (0)