Skip to content

Instantly share code, notes, and snippets.

View osk's full-sized avatar

Ólafur Sverrir Kjartansson osk

  • Reykjavík, Iceland
View GitHub Profile
import slugify from 'slugify';
import { valueToSementer } from '../lib/mappers.js';
import type { Course, DepartmentImport } from '../types.js';
/**
* Parse JSON data representing index files.
* @param input string with JSON data
* @returns parsed list of files
*/
export function parseJson(input: string): Array<DepartmentImport> {

Python uppsetning + uppsetning á jupyter notebook

Nótur einstaklings sem ekki hefur notað Python í mörg mörg ár. Allt keyrt á macos 12.5. Mjög verbose.

Uppsetning

Vill byrja á að fá eins afmarkað umhverfi og ég get til að keyra Python.

Leit og smá prófanir leiða mig að pyenv. Einfaldar leiðbeiningar um uppsetningu, enda á að keyra ca.

Smashing Conference, Barcelona, 2017

Let’s Work Together!

Brad Frost

  • Design systems have lots of benefits, to name a few
    • UI consistency & cohesion
    • Faster production
    • Shared vocabulary
  • Easier to test
@osk
osk / patch-prismic.js
Last active April 25, 2017 14:21
Patches prismic.io module for better dev experience
import prismic from 'prismic.io';
/**
* Patches the `prismic.io` module to provide null checks on data that might
* be there or not. You can then safely call the API without running into nulls,
* but you still have to provide some fallback data, e.g.
*
* ```
* const html = data.getStructuredText('key').asHtml() || 'defaultValue';
* const bool = data.getBoolean('nonExistantKey') || false;
@osk
osk / mobx.md
Last active December 16, 2016 14:00
@osk
osk / aldur.md
Last active December 16, 2015 12:28
Smá greining á aldri frambjóðenda í alþingiskosningum 2013. Gögn hér: https://github.com/osk/kosningar2013/tree/master/aldur

Allir frambjóðendur:

  • Meðalaldur 46.17
  • Staðalfrávik 15.40
  • Yngst/ur: Björgúlfur Egill Pálsson 18
  • Elst/ur: Hlíf Böðvarsdóttir 104

Eftir framboði:

Björt framtíð

  • Meðalaldur 42.24
  • Staðalfrávik 11.98