CapsLock is RCTRL ... i do this on all keyboards
FN CapsLock is RCTRL ... was accidently toggling capslock with fn+capslock
LCTRL is FN ... arrow/pg/home on right half, FN+arrow I now prefer on ALL keyboards... so nice
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
{-# LANGUAGE BlockArguments #-} | |
{-# LANGUAGE DeriveAnyClass #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE DerivingStrategies #-} | |
{-# LANGUAGE NumDecimals #-} | |
{-# LANGUAGE QualifiedDo #-} | |
{-# LANGUAGE ViewPatterns #-} | |
-- depends on the "dep-t" and "async" packages | |
module Main where |
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
{ pkgs ? import <nixpkgs> {} }: | |
pkgs.mkShell { | |
packages = [ | |
pkgs.glibcLocales | |
(pkgs.postgresql.withPackages (p: [])) | |
pkgs.pgcli | |
]; | |
shellHook = '' | |
StartPG(){ | |
pg_ctl -w -l $PGDATA/log start |
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
{-# LANGUAGE AllowAmbiguousTypes #-} | |
{-# LANGUAGE BlockArguments #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE StandaloneKindSignatures #-} | |
{-# LANGUAGE TypeApplications #-} | |
{-# LANGUAGE TypeOperators #-} |
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
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
-- https://twitter.com/ChShersh/status/1544240982559948801 | |
module Main where | |
import Data.Kind (Type) | |
import Data.RBR -- from package "red-black-record" | |
( Deletable (Delete), | |
FromList, |
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
export default function Flexy() : JSX.Element { | |
return (<div className="flex flex-row"> | |
<div className = "outline outline-black"> | |
<p>Foo</p> | |
</div> | |
<div className = "outline outline-black"> | |
<p>Bar</p> | |
</div> | |
<div className = "ml-auto outline outline-black" > | |
<p>Baz</p> |
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
{-# LANGUAGE LinearTypes #-} | |
{-# LANGUAGE UnicodeSyntax #-} | |
{-# LANGUAGE ImportQualifiedPost #-} | |
module Main where | |
import Data.Array.Mutable.Linear (Array, set) | |
import Data.Array.Mutable.Linear qualified as Array | |
import Prelude.Linear (Ur(..), (&), (.)) | |
quicksort :: Array Int ⊸ Array Int |
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
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-# LANGUAGE OverloadedRecordDot #-} | |
{-# LANGUAGE KindSignatures #-} | |
module Main where | |
import Control.Lens ( (^.), (&), (.~), Lens ) | |
import Data.Generics.Product.Fields qualified as G | |
import GHC.Records (HasField (..)) |
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
{-# LANGUAGE BlockArguments #-} | |
{-# LANGUAGE ViewPatterns #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE NamedFieldPuns #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
module Main where | |
import Dep.Has (Has(dep), asCall) -- from the "dep-t" package | |
import Control.Monad.IO.Class |
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
-- | Derivations in Nixpkgs are usually the result of a chain of function calls. | |
-- Typically, a function receives some input derivations as arguments (the "inputs | |
-- pattern") and it eventually calls the 'mkDerivation' function, which produces the | |
-- actual derivation value that is put into Nixpkgs. | |
-- | |
-- Turns out that derivation values in Nixpkgs keep a "memory" of how they were produced at | |
-- those two stages: which functions were called, and with which arguments. They | |
-- also provide "hooks" that allow re-running the stages with (partially or | |
-- totally) different arguments, resulting in a new derivation. | |
-- |