Skip to content

Instantly share code, notes, and snippets.

View aaronwolen's full-sized avatar

Aaron Wolen aaronwolen

View GitHub Profile
@aaronwolen
aaronwolen / README.md
Last active July 11, 2022 12:52
allen-institute-merscope

README

Setup

Use conda to install the TileDB Python API and other dependencies.

mamba env create -f environment.yaml
conda activate aind-demo
@benmarwick
benmarwick / rotate-axis-labels-ggplot2.R
Last active March 30, 2024 08:00
I can never remember how to rotate the x-axis labels with ggplot2: theme(axis.text.x = element_text(angle = 90, hjust = 1, vjust = 0.5))
# Adapted from https://stackoverflow.com/a/7267364/1036500 by Andrie de Vries
# This is it: theme(axis.text.x = element_text(angle = 90, hjust = 1, vjust = 0.5))
library(ggplot2)
td <- expand.grid(
hjust=c(0, 0.5, 1),
vjust=c(0, 0.5, 1),
angle=c(0, 45, 90),
@mbinna
mbinna / effective_modern_cmake.md
Last active March 6, 2025 10:10
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@HenrikBengtsson
HenrikBengtsson / workflow.md
Last active January 10, 2017 15:34
WORK FLOW: Git and Bioconductor SVN (2016)

WORK FLOW: Git and Bioconductor SVN (2016)

This is how I currently work with Git and the Bioconductor SVN. I'll use the affxparser package as an example.

Clone existing Git repository

% git clone [email protected]:HenrikBengtsson/affxparser.git
% cd affxparser

Checkout existing Git Flow branches

I'm using the Git Flow workflow everywhere, including this package. In short,

@imjasonh
imjasonh / markdown.css
Last active January 3, 2025 20:15
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
// Jekyll Pygments syntax highlighter styles
// Color scheme
$base03: #002B36
$base02: #073642
$base01: #586E75
$base00: #657B83
$base0: #839496
$base1: #93A1A1
$base2: #EEE8D5
@kates
kates / search_and_replace.sh
Last active August 31, 2019 05:22
bulk search and replace with the silver searcher, awk, sed and xargs
ag "sometext" --nogroup | awk '{print substr($1,1,index($1,":")-1);}' | xargs -I {} sed -i .bak -e 's/sometext/anothertext/g' {}
@chrislkeller
chrislkeller / import_json_appsscript.js
Last active December 27, 2024 01:01
Adds what amounts to an =ImportJSON() function to a Google spreadsheet... To use go to Tools --> Script Editor and add the script and save.
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@trinitronx
trinitronx / truecrypt_fix.bash
Last active February 18, 2025 07:29 — forked from jimjh/truecrypt_fix.bash
Fixes annoying brew doctor messages caused by Truecrypt
#!/bin/bash
libs=( "/usr/local/lib/libmacfuse_i32.2.dylib" \
"/usr/local/lib/libosxfuse_i32.2.dylib" \
"/usr/local/lib/libosxfuse_i64.2.dylib" \
"/usr/local/lib/libmacfuse_i64.2.dylib" \
"/usr/local/lib/libosxfuse_i32.la" \
"/usr/local/lib/libosxfuse_i64.la" \
"/usr/local/lib/pkgconfig/osxfuse.pc" )
@malcook
malcook / pvec.R
Created September 20, 2012 19:32
a retake on parallel:pvec
pvec2<-function(v, FUN, ..., mc.set.seed = TRUE, mc.silent = FALSE,
mc.cores = getOption("mc.cores", 2L), mc.cleanup = TRUE
,combineFUN = `c`
) {
### AUTHOR: [email protected]
### PURPOSE: an improvement(?) on parallel:pvec which
### (1) does not require v to be a vector, rather, v must
### implement `[`, `length`. Thus, i.e. BioConductor List (including
### GRangesList) is supported.
### (2) uses `parallel:splitIndices` to compute indices into v