Skip to content

Instantly share code, notes, and snippets.

"
" Gist url
" https://gist.github.com/rowinf/65b3126f812b6e2985ed828d8bdd9e5f
"
" Normally this if-block is not needed, because `:set nocp` is done
" automatically when .vimrc is found. However, this might be useful
" when you execute `vim -u .vimrc` from the command line.
if &compatible
" `:set nocp` has many side effects. Therefore this should be done
@rowinf
rowinf / sa2-centroids.geojson
Last active July 16, 2020 02:46
Stats NZ 2018
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
function getRandom(min, max) {
return Math.round(Math.random() * (max - min) + min);
}
const generate = () => {
const selected = []
let max = 9
let prev = null
for (let i = 0; i < 4; i++) {

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@rowinf
rowinf / gist:583fcbafe28d24eae323
Last active June 7, 2021 14:15
react-chartjs line chart example
import React from 'react';
import {Line as LineChart} from 'react-chartjs';
function chartData() {
return {
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
datasets: [
{
label: 'My First dataset',