Skip to content

Instantly share code, notes, and snippets.

View dbolser's full-sized avatar
💭
Reversing the polarity

Dan B dbolser

💭
Reversing the polarity
View GitHub Profile
@dbolser
dbolser / README.md
Last active October 28, 2026 17:46
T3 Files context-menu click bug: before and after verification

T3 Files context-menu verification

Reproduction on Linux with Chromium: right-click README.md in Files and click Copy mention.

Before: the menu closes without writing the clipboard or showing a toast. The file tree's document mousedown handler restores focus before the app menu's click handler runs.

After: Copy mention writes README.md and shows Mention copied. Add to chat also inserts the mention.

The focused browser regression test fails on upstream main with zero clipboard calls and passes with the focus handoff fix.

@dbolser
dbolser / README.md
Created December 10, 2024 18:59 — forked from disler/README.md
Use Meta Prompting to rapidly generate results in the GenAI Age

Meta Prompting

In the Generative AI Age your ability to generate prompts is your ability to generate results.

Guide

Claude 3.5 Sonnet and o1 series models are recommended for meta prompting.

Replace {{user-input}} with your own input to generate prompts.

Use mp_*.txt as example user-inputs to see how to generate high quality prompts.

freenas# zpool status
pool: freenas-boot
state: ONLINE
scan: scrub repaired 0 in 0 days 00:21:29 with 0 errors on Wed Dec 23 04:06:29 2020
config:
NAME STATE READ WRITE CKSUM
freenas-boot ONLINE 0 0 0
da0p2 ONLINE 0 0 0
@dbolser
dbolser / debugging_workshop.md
Created February 7, 2020 14:04 — forked from fjahr/debugging_workshop.md
Debugging Bitcoin Core Workshop - Advancing Bitcoin 2020

Debugging Bitcoin Core Workshop

Short link: http://bit.ly/2H2rKjp

Goals of this workshop

  • Learn to use GDB/LLDB when you need it
  • Practice basic commands
  • Drills / Wax on, wax off.
  • We stay high level
@dbolser
dbolser / mediawiki.conf
Created September 25, 2019 12:10
/etc/apache2/sites-enabled/mediawiki.conf
<VirtualHost *:80>
ServerAdmin admin@geromics
DocumentRoot /var/www/html/mediawiki/
ServerName geromics
ServerAlias www.geromics.com
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory "/var/www/html/mediawiki/images">
class Order:
order = {}
def __init__(self, Amount, Price, ID, Side):
self.order = {
'Amount': Amount,
'Price': Price,
'Id': ID,
@dbolser
dbolser / example_pattern.js
Last active April 29, 2019 13:30
Should I be writing JS like this?
// A variable to know when to exit the 'inner' function. When entered = data.length, we know we can safely continue.
var entered = 0
var mah_list = []
async function inner(d, dlength){
// SQL2
setTimeout(function(){
console.log('inner', d, dlength)
mah_list.push(d)
# -serial stdio: redirect the virtual hosts stdio to my console
cur=$(pwd)
sudo qemu-system-arm \
-m 2048 \
-M virt \
-cpu cortex-a15 \
-nographic \
-kernel ${cur}/archlinux-latest/zImage \
-append "root=/dev/vda1 rootfstype=ext4 rw" \
#!/usr/bin/env python
# -1) Why wouldn't I use wc?
from pathlib import Path
# 0) Hopefully making things more maintainable...
import argparse
parser = argparse.ArgumentParser(
@dbolser
dbolser / dummy data.txt
Last active August 17, 2018 11:54
Some dummy alignment data to chain.
+---------------+------------------+----------------+-------------------+-------------------+----------------+-----------+---------+------------+------------+------------+-------+------------------+
| seq_region_id | seq_region_start | seq_region_end | seq_region_length | seq_region_strand | hit_name | hit_start | hit_end | hit_length | hit_strand | perc_ident | score | evalue |
+---------------+------------------+----------------+-------------------+-------------------+----------------+-----------+---------+------------+------------+------------+-------+------------------+
| 82 | 9191436 | 9192063 | 628 | -1 | XR_001930025.1 | 353 | 958 | 606 | 1 | 79 | 221 | 5e-112 |
| 82 | 8315905 | 8316314 | 410 | -1 | XR_001930025.1 | 596 | 1008 | 413 | 1 | 84 | 210 | 4e-106 |
| 127 | 377