Skip to content

Instantly share code, notes, and snippets.

View relrod's full-sized avatar

Rick Elrod relrod

View GitHub Profile
[rick@x230-01 test-git-repo]$ git diff | grep +++ | hexdump -C
00000000 2b 2b 2b 20 62 2f 6c 6f 6f 6b 20 61 74 20 6d 65 |+++ b/look at me|
00000010 20 49 20 61 6d 20 61 20 70 72 65 74 74 79 20 66 | I am a pretty f|
00000020 69 6c 65 2e 74 78 74 09 0a 2b 2b 2b 20 62 2f 6c |ile.txt..+++ b/l|
00000030 6f 6f 6b 5f 61 74 5f 6d 65 5f 49 5f 61 6d 5f 61 |ook_at_me_I_am_a|
00000040 5f 70 72 65 74 74 79 5f 66 69 6c 65 2e 74 78 74 |_pretty_file.txt|
00000050 0a |.|
00000051
elrod-access-sw01#show vlan brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active
600 tennet-primary active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
700 cfnet-primary active Fa0/17, Fa0/18, Fa0/19, Fa0/20
module Stuff where
import Control.Monad (void)
import qualified Data.Text as T
import Text.Trifecta
import Text.Parser.Char
import Text.Parser.Expression
import Text.Parser.Combinators
data AnswerLetter = A | B | C | D deriving (Show, Eq, Read)
#!/usr/bin/env runhaskell
module Main where
import Data.Time.Clock.POSIX
import System.IO
avgNum :: Int
avgNum = 4
main :: IO ()
Require Import Coq.Lists.List.
Require Import FunctionalExtensionality.
Import ListNotations.
Inductive DList (a : Set) :=
| DL : (list a -> list a) -> DList a.
Definition fromList {a : Set} (l : list a) : DList a :=
DL a (app l).
@relrod
relrod / repro.hs
Created April 1, 2017 06:10
Simpler(-ish) GHC bug reproducer
module Main where
import Control.Monad
import Data.AffineSpace
import Data.Thyme.Clock
import Data.Thyme.Time
filterTimes
:: [UTCTime]
-> UTCTime
module ASM6809 where
import Data.ByteString.Builder
import Data.Word
import System.IO
data Instruction =
NOP
| ADDA Word8
| LDA Word8
{-# LANGUAGE FlexibleContexts #-}
module SpecializedIO where
import Control.Monad.Free
data OnlyPrintLine a = OnlyPrintLine String a
instance Functor OnlyPrintLine where
fmap f (OnlyPrintLine s a) = OnlyPrintLine s (f a)
module Main where
import Data.Time.Clock.POSIX
import System.IO
main :: IO ()
main = do
putStrLn "Tap to the beat of a song to determine its BPM."
hSetEcho stdin False
hSetBuffering stdin NoBuffering
ricky@t520 82% /nix/ghc-8.0.1$ make
===--- building phase 0
make --no-print-directory -f ghc.mk phase=0 phase_0_builds
make[1]: Nothing to be done for 'phase_0_builds'.
===--- building phase 1
make --no-print-directory -f ghc.mk phase=1 phase_1_builds
make[1]: Nothing to be done for 'phase_1_builds'.
===--- building final phase
make --no-print-directory -f ghc.mk phase=final all
"inplace/bin/ghc-stage1" -optc-fno-stack-protector -optc-Wall -optc-Wall -optc-Wextra -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-Wpointer-arith -optc-Wmissing-noreturn -optc-Wnested-externs -optc-Wredundant-decls -optc-Iincludes -optc-Iincludes/dist -optc-Iincludes/dist-derivedconstants/header -optc-Iincludes/dist-ghcconstants/header -optc-Irts -optc-Irts/dist/build -optc-DCOMPILING_RTS -optc-DNOSMP -optc-DUSE_LIBFFI_FOR_ADJUSTORS -optc-fno-strict-aliasing -optc-fno-common -optc-Irts/dist/build/autogen -optc-Werror=unused-but-set-variable -optc-Wno-error=