Skip to content

Instantly share code, notes, and snippets.

@CiaranOMara
CiaranOMara / BGZFStreams_issue22.jl
Last active October 15, 2021 00:18
BGZFStreams issue #22
import Pkg
Pkg.activate(".")
Pkg.add(url="https://github.com/CiaranOMara/BGZFStreams.jl#develop")
using BGZFStreams
# Overwrite
@inline function BGZFStreams.ensure_buffered_data(stream)
#@assert stream.mode == READ_MODE
@label doit
while stream.block_index ≤ lastindex(stream.blocks)
@CiaranOMara
CiaranOMara / ssh-deploy-key-wrapper.sh
Created September 20, 2020 05:59 — forked from mpdude/ssh-deploy-key-wrapper.sh
Wrapper around `ssh` to pick the right one from several GitHub deploy keys
#!/bin/bash
# The last argument is the command to be executed on the remote end, which is something
# like "git-upload-pack 'webfactory/ssh-agent.git'". We need the repo path only, so we
# loop over this last argument to get the last part of if.
for last in ${!#}; do :; done
# Don't use "exec" to run "ssh" below; then the trap won't work.
key_file=$(mktemp -u)
trap "rm -f $key_file" EXIT
#=
The purpose of this gist is to explore what a high-level interface or workflow might look like with `BioSymbols` as parametric primitive types.
For ease of conceptual development of a potential high-level interface, I have used `BitVector`s at the middle-level.
I have made no attempt in this example at low-level optimisations.
Operations performed with the `BitVector` would be replaced by optimised bit shiting procedures.
Ideally, the packing and unpacking methods would be refactored into iterators.
=#
abstract type BioSymbolEncoding end
@CiaranOMara
CiaranOMara / primitive_alphabet.jl
Last active June 8, 2020 07:55
Parametric BioSymbols alphabet
#=
The purpose of this gist is to explore what a high-level interface or workflow might look like with `BioSymbols` as parametric primitive types.
For ease of conceptual development of a potential high-level interface, I have used `BitVector`s at the middle-level.
I have made no attempt in this example at low-level optimisations.
Operations performed with the `BitVector` would be replaced by optimised bit shiting procedures.
Ideally, the packing and unpacking methods would be refactored into iterators.
=#
abstract type BioSymbolEncoding end
@CiaranOMara
CiaranOMara / tmux.md
Created August 29, 2017 13:05 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a