Skip to content

Instantly share code, notes, and snippets.

@cmdcolin
cmdcolin / gist:ac2d61cf17ea0077e9bd73d83e26da9e
Created June 2, 2025 00:31
avante.nvim+claude chat log from chakra->vanilla rewrite

can you remove all chakra styles and just use unstyled divs for example

I'll help you remove all Chakra UI styles from the small-card.tsx file and replace them with unstyled divs. Let me analyze what needs to be changed.

I need to check the util.ts file first to understand the arePropsEqual function that's being used in the component.

╭─  view  succeeded
│ running tool
@cmdcolin
cmdcolin / rifts.md
Last active May 26, 2025 14:06
Examples of rifts in software ecosystems

GTF to GFF conversion in bioinformatics

These are two very similar formats. But some people are still just very stuck on GTF, despite being less well defined than GFF.

CJS (commonjs) to ESM (ecmascript modules) in javascript

Just replace your require with import right? Sometimes it works, sometimes it doesn't. There is a lot of insanity that goes on, and it is really hard to do a proper technical analysis because ESM is pretty strict while CJS and the

@cmdcolin
cmdcolin / changes.md
Last active May 3, 2025 17:49
changes.md

Text-editor saturday

My text editor avante.nvim is just going crazy. Previously it dumped diffs into the 'chat sidebar', and I'd accept them with "A" in the sidebar then accept all with "ca" in the main area...vibe coding. But the avante.nvim switched to running tools that run the edits instead, and is just going crazy with tool usage despite me having disable_tools enabled. I dunno. Maybe I should file a bug. But this spurred me to try to work holistically on my editing skills this morning. I just looked at my config and tweaked a million things...

Trying out rose-pine

Trying rose-pine color scheme. It is kinda funny with tons of italic but it's cute

@cmdcolin
cmdcolin / b73_converter.ts
Created April 22, 2025 17:02
b73_converter.ts
import fs from 'fs'
const tracks = JSON.parse(fs.readFileSync(process.argv[2], 'utf8')) as {
tracks: any[]
}
const asm = 'B73'
const assemblyNames = [asm]
const base = 'https://jbrowse.maizegdb.org/B73/'
console.log(
@cmdcolin
cmdcolin / gist:d18669f9b7467d55239ec3d9a7115f52
Last active April 25, 2025 15:16
the json version of an agentic ai discussion some user had
[
{ "role": "user", "type": "message", "content": "hello" },
{
"role": "assistant",
"type": "message",
"content": "Hello! How can I help you today?\n"
},
{
"role": "user",
"type": "message",
@cmdcolin
cmdcolin / out.tsv
Last active March 9, 2025 17:24
plot.R
program size time mean sd
biojsmsa 1024 1.7980085814 1.7634212551000001 0.054614392814706154
biojsmsa 1024 1.7561014924 1.7634212551000001 0.054614392814706154
biojsmsa 1024 1.7711577354 1.7634212551000001 0.054614392814706154
biojsmsa 1024 1.6753254374000002 1.7634212551000001 0.054614392814706154
biojsmsa 1024 1.7957582314 1.7634212551000001 0.054614392814706154
biojsmsa 1024 1.8305949124 1.7634212551000001 0.054614392814706154
biojsmsa 1024 1.8173887264 1.7634212551000001 0.054614392814706154
biojsmsa 1024 1.7924422974 1.7634212551000001 0.054614392814706154
biojsmsa 1024 1.6920777054 1.7634212551000001 0.054614392814706154
@cmdcolin
cmdcolin / gist:053b46493eb6066ac64e19ae43093456
Last active April 25, 2025 15:23
hap-ibd to bed file (not plink bed, just normal genome track bed)
#!/bin/bash
# create a bed file from hap-ibd output with columns "chr, start, end, sample_name1 hap1 sample_name2 hap2"
# add this config to jbrowse get(feature,'sample1')+':HP'+get(feature,'hap1')+' '+get(feature,'sample2')+':HP'+get(feature,'hap2')
# Process file in a fully streaming fashion and pipe directly to bgzip
# Combine header and data in a single stream
(
echo -e "#chr\tstart\tend\tsample1\thap1\tsample2\thap2"
zcat "$1" | awk -F'\t' '{print $5"\t"$6"\t"$7"\t"$1"\t"$2"\t"$3"\t"$4}'
@cmdcolin
cmdcolin / gist.md
Last active March 2, 2025 20:14
fix for baobab deleting wrong folder

Fixing Disk Usage Analyzer (aka baobab) bug where it was deleting the wrong file

Issue thread https://gitlab.gnome.org/GNOME/baobab/-/issues/157#note_2367208

Background on the bug

The Disk Usage Analyzer app (aka baobab) has a "bug" where if you right-click a file, it brings up a context menu and you can then click "Move to Trash". However, if your mouse moves outside the context menu, then it "highlights" or "selects" a different file with the context menu still open, and then trashes the newly highlighted/selected file instead of the one that you originally right-clicked

image

If you want to publish ESM/CJS you can update your package.json to use the
"exports" field, and run the tsc compiler twice over the code, once using
--module cjs
```json
{
"name": "dualpackage",
"version": "1.0.0",
"description": "demo of dual esm/cjs package",
@cmdcolin
cmdcolin / static_jbrowse.md
Last active February 4, 2025 14:47
Using JBrowse on a static file host

One thing that is important to note about JBrowse is that it is a "static site compatible application"

What is a "static site"?

A static site is just a set of plain files like HTML, JS, and CSS

Static sites don't use dynamic "server side" code like PHP, Node.js, Java Servlets, or things like that.