Skip to content

Instantly share code, notes, and snippets.

@thoukydides
thoukydides / SCDC Bin Collections Widget.js
Last active October 31, 2023 20:00
An iOS Scriptable widget to display South Cambridgeshire bin collection dates
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: green; icon-glyph: trash-alt;
// South Cambridgeshire bin collection widget from iOS Scriptable
// Copyright © 2020 Alexander Thoukydides
'use strict';
// South Cambridgeshire District Council API configuration
// (reverse engineered from https://www.scambs.gov.uk/Scripts/bin-calendar.js)
@cadriel
cadriel / tada68_plate.md
Created October 10, 2018 20:03
Configuration notes for SwillKB - tada68

Plate layout

["~\n`","!\n1","@\n2","#\n3","$\n4","%\n5","^\n6","&\n7","*\n8","(\n9",")\n0","_\n-","+\n=",{w:2},"Backspace",{a:7},""],
[{a:4,w:1.5},"Tab","Q","W","E","R","T","Y","U","I","O","P","{\n[","}\n]",{w:1.5},"|\n\\",{a:7},""],
[{w:1.25}, "Stepped", {a:4,w:1.75, x:-1.25},"Caps Lock","A","S","D","F","G","H","J","K","L",":\n;","\"\n'",{w:2.25},"Enter",{a:7},""],
[{a:4,w:2.25},"Shift","Z","X","C","V","B","N","M","<\n,",">\n.","?\n/",{w:1.75},"Shift",{a:7},"",""],
[{a:4,w:1.25},"Ctrl",{w:1.25},"Win",{w:1.25},"Alt",{a:7,w:6.25,_rs:180},"",{a:4,w:1.5},"Alt",{w:1.5},"Win","Menu","Ctrl",{a:7},""]

Custom Polygons, centered on [-x,y]

@darencard
darencard / CDS_extract.md
Last active March 28, 2024 13:30
Extracting spliced sequences (e.g., CDS) from GFF files

Extracting spliced sequences (e.g., CDS) from GFF files

GFF is a common format for storing genetic feature annotations. In the case of gene annotations, subsets of elements are split over multiple lines, as things like exons and CDS features will have gaps based on the full genome sequence. Therefore, while it is easy to extract exon and CDS lines, it can be difficult to associate them together based on a parent (e.g., transcript) ID and perform downstream operations. Even extracting the full CDS sequence using a GFF file can be tricky for this reason, even though it seems trivial.

Here we'll overcome this difficulty using the gffread tool. Installation is pretty easy and is documented in the GitHub README. gffread has a lot of options, but here we'll just document one that extracts the spliced CDS for each GFF transcript (-x option). Note that you can do the same thing for exons (-w option) and can also produce the protein sequence (-y option).

Let's extra

@lewisridden
lewisridden / Iris-Keyboard.kbd.json
Last active November 25, 2023 10:46
Iris Keyboard
[
{
"name": "Iris Keyboard",
"author": "Lewis Ridden"
},
[
{
"x": 3,
"c": "#c4c8c5",
"a": 5
@adam-garcia
adam-garcia / README.md
Last active April 23, 2024 09:41
Viridis Color Palette Generator

Viridis Color Palette Generator

A simple tool for extracting discrete color palette values from the viridis collection of color palettes.

Byobu is a suite of enhancements to tmux, as a command line
tool providing live system status, dynamic window management,
and some convenient keybindings:
F1 * Used by X11 *
Shift-F1 Display this help
F2 Create a new window
Shift-F2 Create a horizontal split
Ctrl-F2 Create a vertical split
Ctrl-Shift-F2 Create a new session
"""
https://www.biostars.org/p/152517/
Example of how to work with Ensembl release 81 GTF files, which:
1) already have genes and transcripts included
2) have unique IDs for genes, transcripts, and exons in the corresponding
"<featuretype>_id" attribute
@nztim
nztim / Stackedit.md
Last active March 14, 2024 04:51
Install StackEdit on Ubuntu 14.04

###Install Node and Bower

  • Set up the NodeSource repo and install Node
  • curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -
  • sudo apt-get install nodejs
  • Install bower: sudo npm install -g bower

Install StackEdit

  • Clone the repo: git clone https://github.com/benweet/stackedit
  • To use a domain other than 'localhost', edit /public/res/constants.js:
  • constants.BASE_URL = "http://stackedit.dev:3000/";
@davetang
davetang / psl_to_bed_best_score.pl
Last active April 9, 2021 13:55
A more documented version of my psl_to_bed_best_score.pl script at http://davetang.org/wiki/tiki-index.php?page=Blat.
#!/usr/bin/env perl
use strict;
use warnings;
=head1 NAME
This scripts converts a psl file into a bed file written by Dave Tang.
=head1 SYNOPSIS
@ssstonebraker
ssstonebraker / sed cheatsheet
Created August 2, 2013 14:06 — forked from un33k/sed cheatsheet
Sed Cheatsheet
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'