Skip to content

Instantly share code, notes, and snippets.

View gka's full-sized avatar
🐢

Gregor Aisch gka

🐢
View GitHub Profile
@dill
dill / example.R
Created February 20, 2016 20:23
display R plots in iTerm2
library(ggplot2)
library(emoGG)
source("imgcat.R")
p <- ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) + geom_emoji(emoji="1f337")
imgcat(print(p))
@CliffordAnderson
CliffordAnderson / berlin-wall.geojson
Last active November 13, 2018 09:32
Berlin Wall GeoJSON converted from Open Street Maps
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rooks
rooks / csv.js
Last active March 12, 2024 12:25
CodeMirror rainbow CSV mode
const DELIM = ','
const QUOTE = '"'
const MAX_LENGTH = 9
const tokenRainbow = state => `string num${state.num}`
const tokenPlain = () => 'string'
CodeMirror.defineMode('csv', function modeCsv(opts, modeOpts) {
let { delimiter = DELIM, rainbow = false } = modeOpts
let token = rainbow ? tokenRainbow : tokenPlain