Skip to content

Instantly share code, notes, and snippets.

View KiaraGrouwstra's full-sized avatar
💁‍♀️

Kiara Grouwstra KiaraGrouwstra

💁‍♀️
  • BIJ1
  • Utrecht, the Netherlands
  • 13:21 (UTC +02:00)
View GitHub Profile
let
pkgs = import <nixpkgs> {};
lib = pkgs.lib;
allOptions = (import <nixpkgs/nixos> {}).options;
# ** some helpers
# Like mapAttrs, but if `null` is returned from the mapping function,
# the element is removed from the attrset.
#
@jul1u5
jul1u5 / Gradually Typed Hasktorch.md
Last active September 3, 2021 09:49
Google Summer of Code 2021 Final Report

Report for GSoC 2021 (Gradually Typed Hasktorch)

This is the final report for the GSoC 2021 project - Gradually Typed Hasktorch. Gradually Typed Hasktorch is a new tensor API for Hasktorch. It has been initiated by my mentor, Torsten Scholak, and as part of GSoC I helped with streamlining this new API.

Student: Julius Marozas Mentor: Torsten Scholak

Index

@puncoz
puncoz / arch-missing-keyring.md
Last active January 2, 2024 19:59
Arch Linux: missing keyring issue on updates

error: key "CEB167EFB5722BD6" could not be looked up remotely error: required key missing from keyring error: failed to commit transaction (unexpected error)

$ sudo pacman-key --lsign-key CEB167EFB5722BD6

if this gives error ERROR: CEB167EFB5722BD6 could not be locally signed.

$ sudo pacman-key --refresh-keys

@KiaraGrouwstra
KiaraGrouwstra / proxy-async.js
Last active January 3, 2021 15:36
using ES6 Proxy to let Promises/Observables pretend like they're regular values
// using ES6 Proxy to let Promises/Observables pretend like they're regular values.
// get the mapping function used for async objects
let getMapper = (target) => target instanceof Promise ? 'then' :
target instanceof Observable ? 'switchMap' : null;
// ^ fails if the Observable is in a local namespace e.g. Rx.Observable
// bind a value to its object if it's a function
let bindFn = (val, obj) => typeof val == 'function' ? val.bind(obj) : val;