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
{% set home_dir = pillar['general']['my_home_dir'] %} | |
add-local-search-path: | |
file.replace: | |
- name: {{ home_dir }}/.bash_profile | |
- pattern: "^PATH=\\$PATH" | |
- repl: "PATH=$PATH:$HOME/usr/bin" | |
- unless: grep "\$HOME/usr/bin" {{ home_dir }}/.bash_profile |
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
Going to run: find /usr -name "*c*" -type f -exec cat {} \; | wc -l | |
0.23s user 0.91s system 17% cpu 6.468 total | |
0.34s user 0.87s system 18% cpu 6.659 total | |
0.27s user 0.87s system 17% cpu 6.527 total | |
0.31s user 0.89s system 17% cpu 6.777 total | |
0.29s user 0.96s system 17% cpu 6.928 total | |
Going to run: find /usr -name "*c*" -type f -exec cat {} + | wc -l | |
0.14s user 0.32s system 95% cpu 0.484 total |
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/zsh | |
SHELL=/usr/bin/zsh | |
do_perf () { | |
printf "Going to run: %s\n" "$1" | |
for i in {1..5}; do | |
time $SHELL -c "$1" | |
done |
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
mine_functions: | |
private_ips: | |
- mine_function: network.ip_addrs | |
- eth1 | |
fqdn: | |
- mine_function: grains.get | |
- fqdn |