Skip to content

Instantly share code, notes, and snippets.

View srid's full-sized avatar
🌤️
Never not this moment

Sridhar Ratnakumar srid

🌤️
Never not this moment
View GitHub Profile
@srid
srid / Boring Haskell.md
Created March 23, 2021 16:36
Boring Haskell

Boring Haskell

Some in the Haskell community set out to create Boring Haskell (aka. Simple Haskell) as a philosophical approach towards Haskell development that emphasizes practicality more than academic perfection.

Manifestos

Discussions

-- | Like `unsafeMapIncremental` but the patch function also takes the old
-- target.
unsafeMapIncrementalWithOldValue ::
(Reflex t, Patch p, Patch p') =>
(PatchTarget p -> PatchTarget p') ->
(PatchTarget p -> p -> p') ->
Incremental t p ->
Incremental t p'
unsafeMapIncrementalWithOldValue f g x =
let x0 = currentIncremental x
@srid
srid / neuron-migrate-wikilinks.sh
Last active November 1, 2020 20:23
neuron-migrate-wikilinks.sh
@srid
srid / neuron.dhall
Last active August 11, 2020 14:55
multi site neuron.dhall
{ formats =
[ "markdown", "org" ],
sites =
[ { siteTitle =
"My private zettelkasten"
, theme =
"brown"
},
{ siteTitle =
let
pkgs = import <nixpkgs> {};
pname = "zettlr";
version = "1.6.0";
in pkgs.appimageTools.wrapType2 rec {
name = "${pname}-${version}";
src = pkgs.fetchurl {
url = "https://github.com/Zettlr/Zettlr/releases/download/v${version}/Zettlr-${version}-x86_64.appimage";
sha256 = "0s6p8rs0ag6j3wvhm518hd80s48s3sk8n20s3mazj6xlvvhc6iy5";
};
@srid
srid / nix-miso-macos-catalina.md
Created May 14, 2020 20:29 — forked from Tehnix/nix-miso-macos-catalina.md
Getting Nix and Miso set up on macOS Catalina

Setting up Nix

Following this thread on getting Nix set up on macOS Catalina, there's a few steps involved (assuming you have no /nix folder):

  1. Set up nix folder: echo 'nix' | sudo tee -a /etc/synthetic.conf

  2. Reboot for it to take effect

  3. Create an APFS volume for Nix (might need to use a different diskX number, check diskutil list for more):

sudo diskutil apfs addVolume disk1 APFSX Nix -mountpoint /nix

@srid
srid / migrate.py
Last active May 19, 2020 12:17 — forked from felko/migrate.py
Migrate neuron zettelkastens to the new hash ID format
#!/usr/bin/env python3.8
import re
import sys
import os
import uuid
from pathlib import Path
import glob
import time
import datetime

Keybase proof

I hereby claim:

  • I am srid on github.
  • I am srid (https://keybase.io/srid) on keybase.
  • I have a public key ASBgNuV-ZMh9ZFRXeUJw4VQ8I3oA5MEZtDWmGw8Xl5dVDAo

To claim this, I am signing this object:

@srid
srid / zerocarb-cult.md
Last active July 21, 2020 14:36
r/zerocarb moderation reports

Reports of misbehaviour by r/zerocarb moderators

These are only a subset of various reports of misbehaviour reported of the r/zerocarb moderators.

@srid
srid / FixedList.elm
Created November 17, 2016 15:08
Attempting fixed list in Elm
module FixedList exposing (..)
type Nil a = Nil
type Cons fa a = Cons a fa
type alias FixedList0 a = Nil a
type alias FixedList1 a = Cons (FixedList0 a) a
type alias FixedList2 a = Cons (FixedList1 a) a
fl1 : FixedList1 Int