Skip to content

Instantly share code, notes, and snippets.

View szeyu's full-sized avatar
:electron:
Upskilling Myself

Sze Yu Sim szeyu

:electron:
Upskilling Myself
View GitHub Profile
!/bin/bash
# Check if feh is running
if pgrep -x "feh" > /dev/null; then
pkill -x feh # Kill feh if running
else
feh -x --scale-down /home/ssyok/Desktop/y2s2_timetable.jpeg & # Open image
fi

Nautilus Script for Linux

A collection of Nautilus Script for you to copy and paste

@szeyu
szeyu / find_delete_stale_branches.sh
Created October 30, 2025 09:04
A script to quickly discover stale branch and manage it (delete)
#!/bin/bash
# Fail fast and show errors
set -euo pipefail
# --- User-editable parameters ---
REPO="${REPO:-rytbank/data-schedules}"
DAYS_OLD="${DAYS_OLD:-30}"
EXCLUDE_PATTERN="${EXCLUDE_PATTERN:-^(main|dev-env|uat-env)$}"
DEFAULT_BRANCH="${DEFAULT_BRANCH:-main}"
@szeyu
szeyu / UV based Dockerfile
Last active October 30, 2025 09:02
Dockerfile for UV Based Project
# trixie version is fixed
FROM astral/uv:0.9-python3.13-trixie AS builder
WORKDIR /builder
ENV UV_COMPILE_BYTECODE=1 \
UV_LINK_MODE=copy \
UV_PYTHON_DOWNLOADS=0 \
UV_HTTP_TIMEOUT=240 \
UV_LOCKED=1
# Copy dependencies files and source code
@szeyu
szeyu / gist:b562774dee798b5f4bebfe9c385720f7
Created March 13, 2025 06:25
Claude Project Instructions - Slidev Copilot Prompt
You are SlidevCopilot, an expert assistant in creating Slidev presentations. You help users create professional presentations quickly while following Slidev best practices.
All official Slidev documentation is attached and should be used as the primary source.
## Core Capabilities
1. MARKDOWN EXPERTISE
- Generate Slidev-compatible markdown
- Configure frontmatter properly
- Implement code highlighting
@szeyu
szeyu / docker-help.md
Created March 11, 2025 16:05 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@szeyu
szeyu / pydantic-ai_summary.md
Created February 28, 2025 05:22 — forked from erikj27/pydantic-ai_summary.md
Documentation for pydantic-ai

Repository Overview

Directory Structure

pydantic-ai
├── LICENSE
├── Makefile
├── README.md
├── docs
│   ├── _worker.js
@szeyu
szeyu / install_cursor.sh
Last active May 6, 2025 10:33 — forked from Kinyugo/install_cursor.sh
Cursor AI IDE Installer and Updater Script
#!/bin/bash
installCursor() {
local CURSOR_URL="https://downloader.cursor.sh/linux/appImage/x64"
local ICON_URL="https://miro.medium.com/v2/resize:fit:700/1*YLg8VpqXaTyRHJoStnMuog.png"
local APPIMAGE_PATH="/opt/cursor.appimage"
local ICON_PATH="/opt/cursor.png"
local DESKTOP_ENTRY_PATH="/usr/share/applications/cursor.desktop"
echo "Checking for existing Cursor installation..."
@szeyu
szeyu / streamlit_navigation_template.py
Last active October 30, 2024 08:30
A sample streamlit navigation template
import streamlit as st
from pages.login import login
from pages.page1 import page1
from pages.page2 import page2
def init_session():
# Check if the user is signed in
if "signed_in" not in st.session_state:
st.session_state["signed_in"] = False