Skip to content

Instantly share code, notes, and snippets.

View gka's full-sized avatar

Gregor Aisch gka

View GitHub Profile
gka / .gitignore
Created February 20, 2024 17:41 — forked from nolanlawson/.gitignore
rollup-plugin-svelte v5 emitCss issue
gka / index.html
Last active September 28, 2020 19:48
external tooltips
<!DOCTYPE html>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="robots" content="noindex, nofollow">
<meta name="googlebot" content="noindex, nofollow">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet href="">
<h1>Hello {chart.title} (svelte 2)!</h1>
<input type="text" bind:value="chart.title" />
<div class="svelte3-here" style="border:2px solid red"></div>
import AppV3 from './bundle.js';
let app;
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
gka / .gitignore
Last active August 31, 2023 14:44
covid19 berlin cases
# ---------------------
# This is the R script that generates the charts, maps and tables for the Datawrapper blog post, written by Lisa Charlotte Rost.
# This is NOT great R code. It works, but much of it could have been achieved with shorter code, more elegant, more efficiently, less confusing and without so many libraries; especially the further you go down the script (I got better in the process, among others thanks to my coworker Gregor Aisch who's still a R pro). Please don't use this code to learn R.
# ---------------------
# load libraries
needs(dplyr, readr, reshape2, jsonlite, data.table, tidyr, htmltab, zoo)
# ^ if this command fails, run
gka / better-slack.css
Created April 8, 2020 22:22
this style helps me get along with the recent slack redesign
@-moz-document url-prefix("") {
.p-top_nav {
background: transparent !important;
box-shadow: none;
pointer-events: none;
.p-workspace {
.p-top_nav__sidebar {
gka / corona-growth.R
Created March 25, 2020 17:51
covid-19 cases growth rates
needs(dplyr, readr, reshape2, tidyr, zoo)
read_csv("") %>%
rename(country = `Country/Region`,
province = `Province/State`) %>%
select(-Lat, -Long) %>%
pivot_longer(-c(country, province), names_to = "date", values_to = "confirmed") %>%
mutate(date = as.Date(date, "%m/%d/%y")) %>%
mutate(country = ifelse(country == "China" & province == "Hong Kong",
"Hong Kong", country)) %>%
gka / App.svelte
Last active March 22, 2021 15:56
svelte 3 lazyload example
<h1>lazyload example</h1>
{#each [0,1,2,3,4,5,6,7,8,9] as i}
<p>Scroll down to load the images. Quo et qui laboriosam rerum. Animi et quia consequuntur quas sit eaque molestias. Accusamus voluptate nulla eligendi. Dolores labore ea asperiores ut voluptas dolorem. Cupiditate in enim quibusdam. Quas quae aliquam sed repellat laboriosam inventore est.</p>
<img alt="random image" use:lazyload src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAABCAQAAABeK7cBAAAAC0lEQVR42mNkAAIAAAoAAv/lxKUAAAAASUVORK5CYII=" data-src="{i}" />
import { lazyload } from './lazyload.js';
gka / .block
Last active September 13, 2019 10:56
license: mit