Export the Slack team's public logs. You'll get a directory with a users.json
file and a directory
for each channel e.g. wheelhouse/
.
Use jq
to pull the JSON objects out of the root array:
cat users.json | jq -c '.[]'
.sdk/ |
{ | |
"brightray": { | |
"devtools": { | |
"preferences": { | |
"hideNetworkMessages": "true" | |
} | |
} | |
} | |
} |
wspq-repro.cabal | |
.stack-work/ |
import ClassyPrelude | |
import Data.Proxy (Proxy (..)) | |
import GHC.Exts (Any, Constraint) | |
import GHC.TypeLits | |
import Unsafe.Coerce (unsafeCoerce) | |
newtype TMap (map :: TMap_) = TMap (HashMap Text Any) -- daaanger zone |
{-# LANGUAGE ScopedTypeVariables #-} | |
module Main where | |
import Control.Concurrent | |
import Control.Monad | |
{- | |
ghc --make Main.hs | |
./Main | |
-} |
.stack-work/ |
#!/usr/bin/env bash | |
set -e | |
template='name: $$NAME$$ | |
version: 0.0.0 | |
build-type: Simple | |
cabal-version: >= 1.9.2 | |
executable $$NAME$$ | |
main-is: Main.hs |
#!/usr/bin/env bash | |
set -e | |
usage() { | |
echo "usage: serve PORT [DIR]" | |
exit 1 | |
} | |
conf_template=' | |
worker_processes 1; |
module Main where | |
import Data.Char | |
import Data.List | |
main :: IO () | |
main = print $ wordIndexes "Hello test World" | |
wordIndexes :: String -> [(Int, String)] |