Last active
July 21, 2019 19:19
-
-
Save adrianparvino/3f53e6305a5f452bc9f5dc01ee47e020 to your computer and use it in GitHub Desktop.
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
nix run nixpkgs.vim -c ex <(cat ~/dummy_credentials) 2>&1 1>/dev/null << EOF | |
> set noro | |
> /\[miyu\] | |
> mark a | |
> /^aws_access_key_id | |
> s/aws_access_key_id *= *// | |
> .w! /dev/stderr | |
> 'a | |
> /^aws_secret_access_key | |
> s/aws_secret_access_key *= *// | |
> .w! /dev/stderr | |
> EOF | |
miyu | |
meow |
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
findSubString str = try (string str) <|> (anyChar *> findSubString str) | |
parser = do | |
a <- findSubstring "[miyu]" >> getPosition | |
b <- findSubstring "aws_access_key_id" >> undefined | |
setPosition a | |
c <- findSubstring "aws_secret_access_key" >> undefined | |
pure (b,c) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment