Skip to content

Instantly share code, notes, and snippets.

View icemac's full-sized avatar

Michael Howitz icemac

View GitHub Profile
@Gabrielhj17
Gabrielhj17 / jigidi-helper.js
Last active February 8, 2024 08:01 — forked from Dan-Q/jigidi-helper.js
Experimental under-development code to streamline Jigidi solving. ADDED CODE AND DESCRIPTION SO THE ORIGINAL CODE CAN BE RUN THROUGH A CHROME BOOKMARK, INSTRUCTIONS IN README
javascript:
window.jColors = ['red', 'blue', 'brown', 'orange', 'yellow', 'pink', 'lightblue', 'lightgreen', 'lightgray'];
window.lColors = ['white', 'black', 'purple', 'darkgray', '#009'];
window.lWidths = [5, 10, 20];
window.jCols = parseInt(document.getElementById('info-creator').innerText.match(/(\d+)×/)[1]);
window.jC = 0;
CanvasRenderingContext2D.prototype.putImageData = function(imageData, dx, dy){
const col = window.jC % window.jCols;
const row = Math.floor(window.jC / window.jCols);
this.fillStyle = window.jColors[col % window.jColors.length];
@Dan-Q
Dan-Q / jigidi-helper.js
Last active May 7, 2024 14:14
Experimental under-development code to streamline Jigidi solving.
window.jColors = ['red', 'blue', 'brown', 'orange', 'yellow', 'pink', 'lightblue', 'lightgreen', 'lightgray'];
window.lColors = ['white', 'black', 'purple', 'darkgray', '#009'];
window.lWidths = [5, 10, 20];
window.jCols = parseInt(document.getElementById('info-creator').innerText.match(/(\d+)×/)[1]);
window.jC = 0;
CanvasRenderingContext2D.prototype.putImageData = function(imageData, dx, dy){
const col = window.jC % window.jCols;
const row = Math.floor(window.jC / window.jCols);
this.fillStyle = window.jColors[col % window.jColors.length];
this.fillRect(-1000,-1000,2000,2000);
@icemac
icemac / zodb_refmap.py
Last active May 13, 2023 06:25 — forked from buchi/zodb_refmap.py
ZODB: find oids of objects referencing a specific oid
"""
Usage
=====
First create a refmap of your ZODB:
>>> r = build_refmap('/path/to/Data.fs')
Now you can find out which objects reference an object you know the oid of:
@mgedmin
mgedmin / pov-update-ztk-py3-status.sh
Last active October 23, 2019 15:34
Daily cron script that updates dynamic data at https://zope3.pov.lt/py3/
#!/bin/sh
# update dynamic files in /var/www/zope3.pov.lt/py3/
# /opt/ztk-py3-status/ is a checkout of https://github.com/mgedmin/ztk-py3-status
# /opt/ztk-py3-status/*.py require python3
# sponge requires moreutils
# convert requires imagemagick
# dot and neato require graphviz
cache_dir=/stuff/pypi-cache