Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to fix a corrupt zsh history file | |
Occasionally you may find you have a corrupt zsh history file preventing you from using the `fc` command or searching the history. Here's how to fix it. | |
Estimated reading time: 1 minutes | |
Table of contents | |
Corrupt ZSH history file | |
How to fix it | |
Making it a script | |
Corrupt ZSH history file | |
If you use zsh for your shell very occasionally you may find the following message appearing indicating a corrupt history file. This is normally after a reboot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function useAbortableAsyncCallback(callback, inputs) { | |
const abortHandleRef = useRef(); | |
const runAbortHandle = useCallback(() => { | |
if (abortHandleRef.current) { | |
abortHandleRef.current(); | |
} | |
}, []); |
Andy Thomason is a Senior Programmer at Genomics PLC. He has been witing graphics systems, games and compilers since the '70s and specialises in code performance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import re | |
import gzip | |
import argparse | |
from collections import defaultdict | |
class Alignment: | |
def __init__(self, in_r_start, in_r_end, in_q_start, in_q_end, in_cigar, in_strand, in_num_matches, in_aln_len, in_num_mismatches): |
A list of useful commands for the FFmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
1.) Download a Nerd Font
2.) Unzip and copy to ~/.fonts
3.) Run the command fc-cache -fv
to manually rebuild the font cache
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# see below for UPDATES that include more shorter ways of conversions | |
# How to convert GTF format into BED12 format (Human-hg19)? | |
# How to convert GTF or BED format into BIGBED format? | |
# Why BIGBED (If GTF or BED file is very large to upload in UCSC, you can use trackHubs. However trackHubs do not accept either of the formats. Therefore you would need bigBed format) | |
# First, download UCSC scripts | |
wget http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/gtfToGenePred | |
wget http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/genePredToBed | |
wget http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/bedToBigBed |