This file contains hidden or 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
| #!/bin/bash | |
| # Convenient when you're using lots of in-browser terminals. | |
| set -eu | |
| MAXLEN=74994 | |
| TARGET=$1 | |
| if [ -f $TARGET ]; then |
This file contains hidden or 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
| package com.banksimple.util | |
| private[util] final class Effectful[T](val origin: T) { | |
| /** | |
| * A special case of doto, andAlso is useful for | |
| * quick logging or output tasks. Similar in use | |
| * to doto, but only takes one function. | |
| * */ | |
| def andAlso(x: T => Unit): T = { x(origin) ; origin } |
This file contains hidden or 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
| task :clean do | |
| important_cleans = `git clean -n -d`.split("\n") | |
| important_cleans.reject! { |file| | |
| file =~ /~$/ or | |
| file =~ /#/ or | |
| file =~ /.beam$/ | |
| } | |
| if important_cleans.size > 0 | |
| puts "Refusing to clean because:" | |
| puts important_cleans.join("\n") |
This file contains hidden or 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
| ---- Minecraft Crash Report ---- | |
| // Daisy, daisy... | |
| Time: 8/15/20 12:52 PM | |
| Description: Unexpected error | |
| java.lang.NullPointerException: Registry Object not present: mahoutsukai:murky_flow | |
| at java.util.Objects.requireNonNull(Unknown Source) ~[?:1.8.0_171] {} | |
| at net.minecraftforge.fml.RegistryObject.get(RegistryObject.java:120) ~[?:?] {re:classloading} | |
| at stepsword.mahoutsukai.util.Utils.isInMurkyWater(Utils.java:158) ~[?:1.15.2-v1.21.6] {re:classloading} |
This file contains hidden or 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
| stack exec --no-ghc-package-path --resolver ghc-8.4.3 --package cabal-install zsh |
This file contains hidden or 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 DeriveFunctor, FlexibleInstances #-} | |
| module Lib where | |
| newtype Mu f = Mu (f (Mu f)) | |
| data ArithF f = | |
| ALit Int | | |
| AAdd f f | | |
| ASub f f deriving Functor |
This file contains hidden or 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 stack | |
| -- stack --resolver lts-10.8 --install-ghc exec ghci | |
| {-# LANGUAGE ConstraintKinds #-} | |
| {-# LANGUAGE ExistentialQuantification #-} | |
| {-# LANGUAGE GADTs #-} | |
| {-# LANGUAGE LambdaCase #-} | |
| -- A key type for pretend use in looking up a doggo in a database. | |
| newtype Key a = Key { unKey :: String } |
This file contains hidden or 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
| data SomeThing = SomeThing { name :: Text, age :: Int } | |
| makeSomeThing :: (Monad m) => m Text -> m Int -> m SomeThing | |
| makeSomeThing nameE ageE = do | |
| name <- nameE | |
| age <- ageE | |
| return $ SomeThing name age |
This file contains hidden or 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
| package stupid | |
| import ( | |
| "fmt" | |
| "reflect" | |
| "unsafe" | |
| ) | |
| type iptr struct { |
This file contains hidden or 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 TypeFamilies, ScopedTypeVariables, OverloadedStrings, TemplateHaskell, RankNTypes #-} | |
| module Main where | |
| import Data.Map (Map(..), empty) | |
| import Control.Lens | |
| import Data.Monoid (mempty) | |
| import Data.Text (Text(..)) | |
| import Control.Applicative (pure) | |
NewerOlder