23-09-28 20:13:14.751 $ nix shell https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/archive/master/ghc-wasm-meta-master.tar.gz --extra-experimental-features nix-command --extra-experimental-features flakes
error: flake 'https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/archive/master/ghc-wasm-meta-master.tar.gz' does not provide attribute 'packages.x86_64-linux.defaultPackage.x86_64-linux', 'legacyPackages.x86_64-linux.defaultPackage.x86_64-linux' or 'defaultPackage.x86_64-linux'
View great.md
View shoe.el
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
(defun shoe-write-script (script) | |
"Write SCRIPT to the proper place." | |
(let* ((script-dir (shoe-script-dir script)) | |
(script-path (shoe-script-file-path "/" script-dir))) | |
(with-temp-file script-path (insert script)))) | |
(defun shoe-script-file-path (script &optional dir) | |
"Produce the file path for SCRIPT." | |
(concat (or dir (shoe-script-dir script)) | |
"/" |
View reify-reflect.hs
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
{- | |
Examples: | |
> reify @Int $ eval $ A (reflect (abs :: Int -> Int)) (I (-9)) | |
9 | |
> reify @Int $ eval $ A (A (reflect ((*) :: Int -> Int -> Int)) (reflect @Int 3)) (reflect @Int 5) | |
15 |
View alphacephei.Dockerfile
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
FROM ubuntu:20.04 | |
RUN apt-get update -y | |
RUN apt-get install -y python pip | |
COPY . /home/chris/Work/alphacephei/vosk-server | |
WORKDIR /home/chris/Work/alphacephei/vosk-server | |
RUN pip install -r requirements.txt && pip3 install sounddevice | |
RUN apt-get install -y libportaudio2 |
View gist:6baa39093104028b2876019ca33c3731
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
import System.Posix.Signals | |
main = do | |
mainId <- RIO.myThreadId | |
_ <- | |
installHandler | |
softwareTermination | |
(CatchOnce | |
(do S8.putStrLn "Received SIGTERM. Killing main thread." | |
killThread mainId)) |
View cell-load.hs
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
-- | Load a renamed cell. | |
resolveRenamedCell :: | |
Map Hash (Either LoadError LoadedExpression) | |
-> FillerEnv LoadError | |
-> IsRenamed (Expression Renamed) | |
-> RIO DocumentReader (Either LoadError (IsResolved (Expression Resolved))) | |
resolveRenamedCell globalTypes globalHashes isRenamed = do | |
hasConstraints <- | |
pure $ | |
first LoadGenerateError $ |
View Basic type solver tests.hs
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
fineGrained :: Spec | |
fineGrained = do | |
describe | |
"Successful" | |
(do it "a ~ a" (shouldReturn (unifyConstraints' [a .~ a]) (pure [])) | |
it | |
"Integer ~ Integer" | |
(shouldReturn (unifyConstraints' [_Integer .~ _Integer]) (pure [])) | |
it | |
"a ~ b" |
View hindent
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
22-03-21 13:32:52.939 $ cat /opt/hindent-ormolu | |
#!/bin/bash | |
/opt/ormolu-0.1.4.1 \ | |
"--ghc-opt" "-XBangPatterns" \ | |
"--ghc-opt" "-XNumericUnderscores" \ | |
"--ghc-opt" "-XOverloadedLabels" \ | |
"--ghc-opt" "-XPatternSynonyms" \ | |
"--ghc-opt" "-XTypeApplications" \ | |
"--mode" "stdout" |
View README.md
Installing a TLS SSL certificate in HAProxy from Namecheap - Sectigo Limited certificate
When buying an SSL certificate from Namecheap, you generate a CSR, which generates a private key, save that for later as private.key.
After you've paid for your certificate, you recieve a zip file that looks like this:
$ ls -alh
total 52K
View Int-taking-funcs.hs
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
Prelude/Data.List/Data.Vector/Data.Map: | |
(!!) :: [a] -> Int -> a | |
replicate :: Int -> a -> [a] | |
take :: Int -> [a] -> [a] | |
drop :: Int -> [a] -> [a] | |
splitAt :: Int -> [a] -> ([a], [a]) | |
NewerOlder