Skip to content

Instantly share code, notes, and snippets.

View alekseyev's full-sized avatar

Oleksii Aleksieiev alekseyev

View GitHub Profile
@alekseyev
alekseyev / SKILL.md
Created May 25, 2026 07:25
nicegui-quirks
name nicegui-quirks
description Pitfalls and workarounds when writing NiceGUI / Quasar code — layout centering, input prop forwarding, dialog/upload/table/select gotchas, browser-side JS interop, and cookie/auth flows. Apply these when writing or reviewing NiceGUI page code so you don't rediscover the same bugs. TRIGGER when: editing or writing Python that imports `nicegui` or calls `ui.*` / `app.*` from NiceGUI; user asks about NiceGUI, Quasar, or any of `ui.dialog` / `ui.upload` / `ui.table` / `ui.select` / `ui.input` / `ui.html` / `ui.add_body_html` / `ui.run_javascript` / `ui.navigate`; user is debugging a NiceGUI page that "looks wrong" or behaves unexpectedly in the browser. SKIP: non-Python files; Python without NiceGUI imports; general web/frontend questions unrelated to NiceGUI.
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
</head>
<body>
<div class="container">
@alekseyev
alekseyev / fabfile.py
Created October 3, 2013 14:23
Fabric script to transfer DB dump from remote server
import os
import json
import time
from fabric.api import local, run, cd, env, task
from fabric.operations import get
from fabric.context_managers import cd, prefix
from settings import DATABASES, MEDIA_ROOT
@alekseyev
alekseyev / odm.py
Last active December 24, 2015 04:38
Simple Mongo ODM
from somewhere import get_mongo_db
# assuming get_mongo_db returns db instance
class MongoException(Exception):
pass
class MongoField(object):
pass
@alekseyev
alekseyev / futures.py
Last active December 21, 2015 05:28
Concurrency in Python 3
# Source: http://firepear.net/docs/python3-futures-2.html
from concurrent.futures import ThreadPoolExecutor
import random
import time
def sleep_until_the_future(**kwargs):
kwargs['launchtime'] = time.time()
time.sleep(kwargs['sleeptime'])
return kwargs