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
uptime | |
dmesg | tail | |
vmstat 1 | |
mpstat -P ALL 1 | |
pidstat 1 | |
iostat -xz 1 | |
free -m | |
sar -n DEV 1 | |
sar -n TCP,ETCP 1 |
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 bash | |
set -eu | |
eventlog-to-chrome read "$1" | |
import-chrome "$1.trace.json" "$1.tracy" | |
tracy "$1.tracy" |
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 stack | |
-- stack --resolver lts-15.11 --install-ghc script --compile --package ghc-events | |
{-# language lambdacase #-} | |
import ghc.rts.events | |
import system.environment | |
main :: io () | |
main = do |
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 stack | |
-- stack script --resolver lts-14.25 --install-ghc --compile | |
{-# LANGUAGE LambdaCase #-} | |
{-# LANGUAGE NumericUnderscores #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE TupleSections #-} | |
{-# LANGUAGE ViewPatterns #-} | |
-- --package typed-process |
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
-- Usage: | |
-- | |
-- import Network.HTTP.Flaky | |
-- | |
-- instance MonadHttp MyMonad where | |
-- handleHttpException = liftIO . throwIO | |
-- getHttpConfig = return flakyConfig | |
module Network.HTTP.Flaky | |
( flakyConfig |
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 python | |
# reading from file is left out as an exercise | |
# as is quitting with 'q' | |
# and wrapping | |
# and possibly something else | |
import curses | |
import sys |
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 Control.Applicative | |
import Control.Monad.Loops | |
import Data.Time.Clock.POSIX | |
import System.IO | |
main :: IO () | |
main = do | |
stampedLines <- whileM (not <$> isEOF) $ do | |
l <- getLine | |
t <- getPOSIXTime |