Skip to content

Instantly share code, notes, and snippets.

@tnajdek
tnajdek / 0-README.md
Last active August 15, 2026 12:36
Lost dirty-mark in parallel `mark_dirty_trees`

Lost dirty-mark in parallel mark_dirty_trees

Children respawned in the same frame their predecessors were despawned can keep the default identity GlobalTransform indefinitely, rendering at the world origin instead of under their parent. Observed in a real-world project, this is a self-contained reproduction. With a handful of orphans per frame, the dead entities usually reach the bitset after the live climbs already ran, so the bug needs an unlucky task-scheduling inversion (in the source game: a few sightings per week during development)

Affects Bevy 0.19.1 with the multi_threaded feature and default

const api = require('zotero-api-client'); // >= 0.36.0
const fs = require('fs');
const SparkMD5 = require('spark-md5');
const filedata1 = fs.readFileSync('picture-v1.jpg');
const filedata2 = fs.readFileSync('picture-v2.jpg');
const APIKEY = '';
const USERID = '';
const ITEM_KEY = '';
@tnajdek
tnajdek / .zshrc
Last active September 26, 2020 10:27
.zshrc for OSX
# ZSH history
setopt append_history
setopt hist_expire_dups_first
setopt hist_fcntl_lock
setopt hist_ignore_all_dups
setopt hist_lex_words
setopt hist_reduce_blanks
setopt hist_save_no_dups
setopt share_history
unsetopt menu_complete # do not autoselect the first completion entry
const api = require('./src/api');
const fs = require('fs');
const filedata = fs.readFileSync('picture.jpg');
// live api, vexlign credentials
const APIKEY = '';
const USERID = '';
const ITEM_KEY = '';
(async () => {
@tnajdek
tnajdek / .slate.js
Last active October 18, 2018 12:43
My basic slate file
var moveops = [];
for(let j = 1; j < 5; j++) {
moveops[j] = [];
for(let i = 0; i < j; i++) {
moveops[j][i] = [];
for(let k = 0; k < 5; k++) {
let f = win => {
let op = slate.operation("move", {
x: `screenOriginX + ${i} * (screenSizeX/${j})`,
$breakpoints: (
'minimal': 320,
'small': 480,
'vga': 640,
'tablet': 768,
'medium': 800,
'large': 1000,
'sxga': 1280,
'wsxga': 1680,
'hd': 1920
@minimal: 320px;
@small: 480px;
@medium: 768px;
@large: 1024px;
@hd: 1920px;
@upto-minimal : e(%("screen and (max-width: %d)", @minimal));
@upto-small : e(%("screen and (max-width: %d)", @small));
@upto-medium : e(%("screen and (max-width: %d)", @medium));
@tnajdek
tnajdek / fabfile.py
Created October 6, 2013 19:04
Fabfile for a python backend, js frontend project;
# -*- coding: utf-8 -*-
import logging
import os
from os.path import abspath, dirname, join
from os import environ
from fabric.api import env, task
from fabric.operations import local
from fabric.operations import sudo
from fabric.utils import puts
@tnajdek
tnajdek / lessap.sh
Last active December 15, 2015 19:28
Watch less file/dir for changes and automatically rebuild your css. Works on Linux.
#!/bin/bash
# All the credit goes to Iso
# Original version hosted here: http://code.krml.fr/less.app/src
# Version 2012-02-07
# Compilation stuff
function compile {
# Nice path where the CSS belong
dir=$(readlink -f $(dirname "${cssroot}/${1/#$lessroot}"))
@tnajdek
tnajdek / chrome-dev.sh
Created March 17, 2013 15:06
On Linux runs another clean (without any user-specific data, cookies etc.) instance of the chrome browser alongside existing session. Useful for debugging etc.
#!/bin/bash
/usr/bin/google-chrome --user-data-dir=/tmp --no-default-browser-check -no-first-run $@