Skip to content

Instantly share code, notes, and snippets.

@abathur
Last active April 8, 2021 00:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abathur/84343797dc63dcdd2db94290d821f81d to your computer and use it in GitHub Desktop.
Save abathur/84343797dc63dcdd2db94290d821f81d to your computer and use it in GitHub Desktop.
saving a few milis
╓─[ nixpkgs ] rmlint.darwin.support ~/work/nixpkgs
╚═> abathur on 0d5099a0 $ KIWI_COMMAND='if [ "$(id -u)" -ne 0 ]; then echo "$(date "+%Y-%m-%d.%H:%M:%S") $(pwd) $(history 1)" __ ~/.logs/bash-history-$(date "+%Y-%m-%d").log; fi'
Wed Apr 07 2021 19:27:00 -->
Wed Apr 07 2021 19:27:00 (917µs)
╓─[ nixpkgs ] rmlint.darwin.support ~/work/nixpkgs
╚═> abathur on 0d5099a0 $ eval ${KIWI_COMMAND}
Wed Apr 07 2021 19:27:05 -->
2021-04-07.19:27:05 /Users/abathur/work/nixpkgs 1220 Apr 07 19:27:05>eval ${KIWI_COMMAND} __ /Users/abathur/.logs/bash-history-2021-04-07.log
Wed Apr 07 2021 19:27:05 (28.1ms)
╓─[ nixpkgs ] rmlint.darwin.support ~/work/nixpkgs
╚═> abathur on 0d5099a0 $ eval ${KIWI_COMMAND}
Wed Apr 07 2021 19:27:08 -->
2021-04-07.19:27:08 /Users/abathur/work/nixpkgs 1220 Apr 07 19:27:05>eval ${KIWI_COMMAND} __ /Users/abathur/.logs/bash-history-2021-04-07.log
Wed Apr 07 2021 19:27:08 (29.6ms)
╓─[ nixpkgs ] rmlint.darwin.support ~/work/nixpkgs
╚═> abathur on 0d5099a0 $ ABA_COMMAND='if [[ $EUID -ne 0 ]]; then printf "%(%Y-%m-%d.%H:%M:%S)T $PWD %s $(history 1) __ ~/.logs/bash-history-$(printf "%(%Y-%m-%d)T").log \n"; fi'
Wed Apr 07 2021 19:27:29 -->
Wed Apr 07 2021 19:27:29 (912µs)
╓─[ nixpkgs ] rmlint.darwin.support ~/work/nixpkgs
╚═> abathur on 0d5099a0 $ eval ${ABA_COMMAND}
Wed Apr 07 2021 19:27:51 -->
2021-04-07.19:27:51 /Users/abathur/work/nixpkgs 1222 Apr 07 19:27:51>eval ${ABA_COMMAND} __ ~/.logs/bash-history-2021-04-07.log
Wed Apr 07 2021 19:27:51 (8.218ms)
╓─[ nixpkgs ] rmlint.darwin.support ~/work/nixpkgs
╚═> abathur on 0d5099a0 $ eval ${ABA_COMMAND}
Wed Apr 07 2021 19:27:53 -->
2021-04-07.19:27:53 /Users/abathur/work/nixpkgs 1222 Apr 07 19:27:51>eval ${ABA_COMMAND} __ ~/.logs/bash-history-2021-04-07.log
Wed Apr 07 2021 19:27:53 (8.100ms)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment