Skip to content

Instantly share code, notes, and snippets.

@aaronwolen
aaronwolen / find-and-rename.sh
Created September 29, 2021 19:11
Find and rename files
while read line; do
mv -v "$line" "${line// - /}"
done < <(find . -name '* .png')
@aaronwolen
aaronwolen / setup-ebs.sh
Last active November 25, 2021 13:24
Setup EBS Raid on EC2 Linux Instance
#!/usr/bin/env bash
# format
sudo mkfs -t ext4 /dev/nvme1n1
# mount ebs volumne
sudo mkdir -p /mnt/data
sudo mount /dev/nvme1n1 /mnt/data
# fix permissions
@aaronwolen
aaronwolen / Makefile
Created July 15, 2021 20:07
Modify ClinVar VCF for ingestion into TileDB-VCF
# genome reference
fai_url := s3://broad-references/hg38/v0/Homo_sapiens_assembly38.fasta.fai
fai_file := $(notdir $(fai_url))
# original clinvar vcf
vcf_url := ftp.ncbi.nlm.nih.gov/pub/clinvar/vcf_GRCh38/clinvar_20210710.vcf.gz
raw_vcf := $(notdir $(vcf_url))
# modified vcf file
mod_vcf := $(raw_vcf:%.vcf.gz=%_modified.vcf.gz)
@aaronwolen
aaronwolen / osfr-wiki-download.R
Created June 22, 2021 16:18
Use osfr to download individual OSF Wikis
library(osfr)
library(purrr)
library(tibble)
# functions ---------------------------------------------------------------
# id: project GUID
.osf_list_wikis <- function(id) {
api_path <- sprintf("nodes/%s/wikis", id)
@aaronwolen
aaronwolen / tiledbvcf-ingest-export-test.sh
Last active October 21, 2020 17:19
Shell script to run ingest/exports with different versions of tiledb-vcf
#!/usr/bin/env bash
# variables
#############
tilevcf="dist/bin/tiledbvcf"
tmpdir="/mnt/data/tmp"
samplefile="$tmpdir/samples.txt"
output_dir="data"
export_dir="$output_dir/exports"
@aaronwolen
aaronwolen / door-notification.yaml
Last active July 25, 2020 18:38
HASS Door Notification
- alias: Announce Door Open
trigger:
- platform: state
entity_id:
- binary_sensor.back_door
- binary_sensor.front_door
to: 'on'
for:
seconds: 30
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aaronwolen
aaronwolen / macos-10.15-prefix-dist
Last active May 18, 2020 19:30
Outputs from various build attempts.
../bootstrap --prefix=../dist
-- The C compiler identification is AppleClang 11.0.3.11030032
-- The CXX compiler identification is AppleClang 11.0.3.11030032
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/g++
@aaronwolen
aaronwolen / tasks.json
Last active April 7, 2020 20:52
vscode tasks for building tiledb-vcf
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "setup",
"type": "shell",
"options": {
"cwd": "${workspaceFolder}/libtiledbvcf"

Keybase proof

I hereby claim:

  • I am aaronwolen on github.
  • I am aaronwolen (https://keybase.io/aaronwolen) on keybase.
  • I have a public key ASDImqf4QGQ1fLEAtxsn8eS4coyrtRv76ah_gmzb6_BMZwo

To claim this, I am signing this object: