Skip to content

Instantly share code, notes, and snippets.

View flekschas's full-sized avatar
👋

Fritz Lekschas flekschas

👋
View GitHub Profile
@flekschas
flekschas / index.html
Last active April 15, 2024 09:43
Custom styled scroll bar with 'margin'
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Custom scroll bar with 'margin'</title>
</head>
<body>
<div id="content"></div>
</body>
</html>
@flekschas
flekschas / conclusion.md
Created July 31, 2018 14:59
Performance of Object.keys vs Object.values for getting the number of props of an object

Results

Let's get started!
VM73:13 Object.keys took: 20234.000000054948msecs
VM73:19 Object.values took: 5987.800000002608msecs

Conclusion

@flekschas
flekschas / Install-Cypher-Syntax-Highlight-ST3.md
Last active April 11, 2023 03:34
Add Syntax Highlighting for Cypher in Sublime Text 3

Credit goes to

  1. Jan Klaas Kollhof (and Fred Benenson)
  2. Chris Skardon

Installation

Since the original plugin has been developed for Sublime Text 2 we have to install it manually.

  1. Go to https://github.com/fredbenenson/sublime-cypher, download ZIP of the repo, extract the content and rename the folder to ‘Cypher’. You can download the original repo from https://github.com/kollhof/sublime-cypher but Fred Benenson introduced a handy fix for UTF-8 data, which hasn't integrated at the point of this writing.
@flekschas
flekschas / README.md
Last active November 16, 2022 16:14
Generate a random directed acyclic graph hierarchy graph and serialize as JSON

Generate random DAG in JSON

Generates a random directed acyclic graph and serializes it in JSON

Installation

  1. git clone https://gist.github.com/flekschas/0ea70dec4d92bc706e61 random-graph-json && cd random-graph-json
  2. mkvirtualenv -a $(pwd) random-graph-json [Optional but recommended]
  3. pip install -r requirements.txt
@flekschas
flekschas / README.md
Last active March 3, 2021 19:06
Sample-based encoding of multivecs

Sample-based encoding of multivecs

Using overlay in combination with dataTransform and filter we can customize the color encoding of each row in the multivec dataset.

This is more of a proof of concept rather than a recommendation. Normally you would just want to just one colormap instead of different once!

Live demo: https://gosling.js.org?gist=flekschas/a43a1c9924b36d9f0c66862c3314689c

@flekschas
flekschas / README.md
Last active March 2, 2021 19:48
Gosling: Vector Data

Vector Data

A simple data showing how to load vector data.

property type description
type string required, "vector"
url string required, URL pointing to a HiGlass server's tileset_info endpoint
column string required, the name of center position of bins.
value string required, the name of the bin value.
@flekschas
flekschas / _pilingjs.json
Last active February 9, 2021 20:22
Book Covers
{
"title": "Book Covers",
"thumbnail": "https://user-images.githubusercontent.com/932103/89745160-d952b780-da7f-11ea-9af4-54a3fd205e07.jpg"
}
@flekschas
flekschas / _pilingjs.json
Last active September 22, 2020 22:10
Matrices
{
"title": "Matrices",
"subtitle": "Hi-C Loop Patterns",
"thumbnail": "https://user-images.githubusercontent.com/932103/90644105-5b6e7900-e202-11ea-8fa3-3f9c4c469f19.jpg"
}
@flekschas
flekschas / _pilingjs.json
Last active September 14, 2020 13:23
Ridge Plots
{
"title": "Ridge Plots",
"subtitle": "Global Surface Temperature",
"thumbnail": "https://user-images.githubusercontent.com/932103/92788343-dcd7a800-f377-11ea-9077-f519eac82a62.jpg"
}
@flekschas
flekschas / rao-2014-gm12878-mbol-1kb-mres-chr4-tads-hipiler-v140.json
Last active December 5, 2019 21:17
HiPiler Example: TAD calls of Arrowhead for chromosome 4 from Rao et al. (2014) GM12878. TADs are normalized to 60x60 bins to support piling, the diagonal is excluded for better of-diagonal patterns, and the matrix is capped at the 99-percentile against outliers. See https://flekschas.github.io/hipiler/ for a live demo.
{
"fgm": {
"fragmentsServer": "//higlass.io/api/v1/",
"fragmentsPrecision": 2,
"fragmentsDims": 60,
"fragmentsPadding": 50,
"fragmentsBaseRes": 1000,
"fragmentsPercentile": 99,
"fragmentsIgnoreDiags": 1,
"fragments": [