This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local a = vim.api | |
local test_data = { "foo", "bar", "bax" } | |
local test_options = { | |
height = 75, | |
width = 100, | |
relative = "editor", | |
anchor = "NW", | |
style = "minimal", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
description = "Nix. All. The. Things."; | |
inputs = { | |
home-manager = { | |
url = "github:rycee/home-manager"; | |
inputs.nixpkgs.follows = "/unstable"; | |
}; | |
nixpkgs = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Edit this configuration file to define what should be installed on | |
# your system. Help is available in the configuration.nix(5) man page | |
# and in the NixOS manual (accessible by running ‘nixos-help’). | |
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Prelude | |
import Effect (Effect) | |
import Control.Monad.Except.Trans (throwError) | |
import Effect.Console (log) | |
import Control.Alt ((<|>)) | |
import Data.Generic.Rep as GR | |
import Foreign (Foreign, ForeignError(..), fail) | |
import Foreign as Foreign |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env nix-shell | |
#! nix-shell -p "haskellPackages.ghcWithPackages (pkgs: with pkgs; [fgl])" -i "runghc -Wall" | |
{-# LANGUAGE ScopedTypeVariables #-} | |
import qualified Data.Graph.Inductive.Graph as G | |
import qualified Data.Graph.Inductive.NodeMap as GM | |
import Data.Graph.Inductive.PatriciaTree (Gr) | |
type Graph = Gr String Integer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env nix-shell | |
#! nix-shell -p "haskellPackages.ghcWithPackages (pkgs: with pkgs; [scotty text relude co-log])" -i "runghc -Wall" | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE DerivingVia #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE InstanceSigs #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE PatternSynonyms #-} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ nix-env -f "<nixpkgs>" -qaP -A haskell.compiler | |
haskell.compiler.ghc8101 ghc-8.10.1 | |
haskell.compiler.integer-simple.ghc8101 ghc-8.10.1 | |
haskell.compiler.ghc8102 ghc-8.10.2 | |
haskell.compiler.integer-simple.ghc8102 ghc-8.10.2 | |
haskell.compiler.ghc8102Binary ghc-8.10.2-binary | |
haskell.compiler.ghc8102BinaryMinimal ghc-8.10.2-binary | |
haskell.compiler.integer-simple.ghc8103 ghc-8.10.3 | |
haskell.compiler.ghc8103 ghc-8.10.3 | |
haskell.compiler.native-bignum.ghcHEAD ghc-8.11.20200824 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const vanillaFn = (notes) => { | |
const grouped = {}; | |
notes.forEach((note) => { | |
const { | |
author: { id: currentId }, | |
content, | |
section, | |
} = note; | |
if (!grouped[section]) grouped[section] = { len: 0, data: {} }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo '[{"name":"v1.22.10","zipball_url":"https://api.github.com/repos/yarnpkg/yarn/zipball/v1.22.10","tarball_url":"https://api.github.com/repos/yarnpkg/yarn/tarball/v1.22.10","commit":{"sha":"785cda8020aa5f513d6f60b8349bca8dab9dd79b","url":"https://api.github.com/repos/yarnpkg/yarn/commits/785cda8020aa5f513d6f60b8349bca8dab9dd79b"},"node_id":"MDM6UmVmNDk5NzA2NDI6cmVmcy90YWdzL3YxLjIyLjEw"}]' | tr ',' '\n' | awk -F'":"' '{ version; | |
gsub(/"/, "", $2) | |
if ($1 ~ /name/ ) { version = $2 } | |
if ($1 ~ /tarball/) { gsub(/v/, "", version); print version, $2 } }' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo '[{"name":"v1.22.10","zipball_url":"https://api.github.com/repos/yarnpkg/yarn/zipball/v1.22.10","tarball_url":"https://api.github.com/repos/yarnpkg/yarn/tarball/v1.22.10","commit":{"sha":"785cda8020aa5f513d6f60b8349bca8dab9dd79b","url":"https://api.github.com/repos/yarnpkg/yarn/commits/785cda8020aa5f513d6f60b8349bca8dab9dd79b"},"node_id":"MDM6UmVmNDk5NzA2NDI6cmVmcy90YWdzL3YxLjIyLjEw"}]' | tr ',' '\n' | awk -F'":"' '{ version; gsub(/"/, "", $2); if ($1 ~ /name/ ) { version = $2; } if ($1 ~ /tarball/) { gsub(/v/, "", version); print version, $2; } }' |