Skip to content

Instantly share code, notes, and snippets.

View wjurkowlaniec's full-sized avatar
🎹

Wojtek Jurkowlaniec wjurkowlaniec

🎹
View GitHub Profile
@wjurkowlaniec
wjurkowlaniec / llmcmd.md
Created April 11, 2025 15:48
Bash command hints from LLM
  1. install local ollama or use remote API, in my case local ollama
llm install llm-ollama
llm models default qwen2.5:3b
  1. Configure zsh. I have oh-my-zsh, should be compatible

vim ~/.zshrc

Global rules for Windsurf editor
- don't apologize, just continue with your work. if your comment doesn't bring anything, don't write anything, or at most one
- be more concise with your descriptions
- don't write such big docstrings, just one line sometimes work. Code should have clean names to describe what's happening
- do full typed code
- in the end, in separate step, look how to refactor it
- do OOP, but not all there is, not JAVA style
- don't confirm what I wrote, just execute.
- don't ask for running main command to test
from typing import List, Optional
from fastapi import FastAPI, Query, HTTPException
from fastapi.responses import FileResponse
from pydantic import BaseModel, Field
from enum import Enum
from datetime import datetime
app = FastAPI(title="Cancer Dataset API")
# Enums for filter options
import os
import pathlib
import torch
from transformers import AutoModel, AutoTokenizer
import json
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
# Settings
codebase_dir = "project/path"
@wjurkowlaniec
wjurkowlaniec / tictactoe.rs
Created January 1, 2023 18:20
first blood with Rust
use std::io::{self, BufRead};
use std::process::exit;
const PLAYER_SYMBOL: [&str; 2] = ["X", "O"];
fn main() {
let mut board: [[&str; 3]; 3] = [[" ", " ", " "], [" ", " ", " "], [" ", " ", " "]];
let mut current_player: usize = 0;
let mut moves_count: u8 = 0;
use std::io::{self, BufRead};
use std::process::exit;
const PLAYER_SYMBOL: [&str; 2] = ["X", "O"];
// TODO use enum instead of string representation
// TODO maybe use Display for printing proper values
fn main() {
let mut board: [[&str; 3]; 3] = [[" ", " ", " "], [" ", " ", " "], [" ", " ", " "]];
let mut current_player: usize = 0;
  1. Make a fork of the project to review, and from then on use that fork for the reviews
  2. Create an empty branch with 'git checkout --orphan', for example git checkout --orphan review-1-target
  3. Run git status and note that all files are staged. Remove all files by unstaging them first with git reset . and, after, cleanning them with git clean -df.
  4. On the empty branch, create an empty commit with git commit --allow-empty -m 'Empty commit'
  5. Push the empty branch to our fork, git push -u origin review-1-target
  6. Now let’s go to the branch we want to review (say master), and create a new branch from it: git checkout -b review-1.
  7. We then want to rebase from our empty/target branch. Make sure to place the empty commit as the first commit on the branch, git rebase -i review-1-target
  8. Push the branch to the fork, git push -u origin review-1
import asyncio
import requests
import aiohttp
import threading
lat = 52.52
long = 13.41
# async/await
@wjurkowlaniec
wjurkowlaniec / log.sh
Created September 12, 2022 21:29
Make code review from code on master/main
(base) ➜ gitgit git:(master) ✗ git commit -m "siema"
On branch master
Initial commit
Untracked files:
(use "git add <file>..." to include in what will be committed)
plik.txt
nothing added to commit but untracked files present (use "git add" to track)
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
</head>
<body>
<h1>Generowanie offline PIN Enko</h1>
<h2>Wprowadź numer wozaka</h2>
<input type="text" placeholder="Numer ID wozaka " id="pin_input">