Skip to content

Instantly share code, notes, and snippets.

View jonmatum's full-sized avatar

Jonatan Mata jonmatum

View GitHub Profile
@jonmatum
jonmatum / docker-compose.yml
Last active May 15, 2025 01:47
Docker Compose setup for Draftmk — includes backend, frontend, and NGINX-powered preview service with dynamic port configuration and isolated dev data under .draftmk.
services:
backend:
image: jonmatum/draftmk-backend:latest
environment:
APP_ENV: local
MODULE_NAME: app.main
VARIABLE_NAME: app
GITHUB_TOKEN: ${GITHUB_TOKEN}
GITHUB_REPO: ${GITHUB_REPO}
GITHUB_BRANCH: ${GITHUB_BRANCH}
@jonmatum
jonmatum / .p10k.zsh
Last active April 30, 2025 16:16
Powerlevel10k Zsh config with powerline style, rainbow theme, Nerd Font v3 icons, angled separators, 12h clock, instant+transient prompt, and rich support for Git, version managers, cloud tools, and shells.
# Generated by Powerlevel10k configuration wizard on 2025-04-03 at 12:31 CST.
# Based on romkatv/powerlevel10k/config/p10k-rainbow.zsh, checksum 49619.
# Wizard options: nerdfont-v3 + powerline, small icons, rainbow, unicode, 12h time,
# angled separators, sharp heads, flat tails, 1 line, sparse, many icons, concise,
# transient_prompt, instant_prompt=verbose.
# Type `p10k configure` to generate another config.
#
# Config for Powerlevel10k with powerline prompt style with colorful background.
# Type `p10k configure` to generate your own config based on it.
#
@jonmatum
jonmatum / .zshrc
Last active April 30, 2025 16:14
Customized .zshrc for a modular DevContainer shell environment. Includes Oh My Zsh setup, plugin configuration (autosuggestions, syntax highlighting), and Powerlevel10k theme activation. Designed for portability across Amazon Linux, Ubuntu, Debian, WSL, and macOS.
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH
@jonmatum
jonmatum / .p10k.zsh
Last active April 28, 2025 18:50
Powerlevel10k theme configuration optimized for cloud development environments. Provides a clean, fast, and informative Zsh prompt with Git status, Node.js version, Kubernetes context, and time. Compatible with DevContainers, Codespaces, WSL, and local development setups.
# Generated by Powerlevel10k configuration wizard on 2025-04-28 at 18:50 UTC.
# Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 37983.
# Wizard options: powerline, ascii, lean, 1 line, compact, concise, transient_prompt,
# instant_prompt=verbose.
# Type `p10k configure` to generate another config.
#
# Config for Powerlevel10k with lean prompt style. Type `p10k configure` to generate
# your own config based on it.
#
# Tip: Looking for a nice color? Here's a one-liner to print colormap.
@jonmatum
jonmatum / App.tsx
Created April 23, 2025 00:41
Minimal React 19 landing page with Tailwind CSS v4 theme toggle. Designed for use in DevContainer templates or starter projects.
import { useState } from "react";
export default function App() {
const [darkMode, setDarkMode] = useState(false);
return (
<main
className={`min-h-screen w-full font-mono flex flex-col items-center justify-center px-6 py-16 transition-colors duration-500 ${darkMode
? "bg-[#0A0A0A] text-[#00FFFF]"
: "bg-black text-green-400"
@jonmatum
jonmatum / ep.py
Last active October 13, 2022 16:30
CFI - Encrypting passwords for use with Python
#!/usr/bin/env python3
"""
Encrypting passwords for use with Python
https://www.mssqltips.com/sqlservertip/5173/encrypting-passwords-for-use-with-python-and-sql-server/
- Problem
Due to requirements in my environment I need to use SQL Server authentication
with my Python scripts instead of Windows trusted authentication. We don’t
want a clear text password stored in the Python scripts and we’re not sure how