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
| # Interpret the Ansible log for humans. In particular, we | |
| # look for command executions and format their content | |
| # | |
| # - name: list files | |
| # shell: "ls -lrt *e*" | |
| # | |
| # Might produce | |
| # | |
| # TASK: [1] *********************************************************** | |
| # changed: [localhost] |
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
| # This gist is compatible with Ansible 1.x . | |
| # For Ansible 2.x , please check out: | |
| # - https://gist.github.com/dmsimard/cd706de198c85a8255f6 | |
| # - https://github.com/n0ts/ansible-human_log | |
| # This program is free software: you can redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation, either version 3 of the License, or | |
| # (at your option) any later version. | |
| # |
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
| var user = { | |
| validateCredentials: function (username, password) { | |
| return ( | |
| (!(username += '') || username === '') ? { error: "No Username Given.", field: 'name' } | |
| : (!(username += '') || password === '') ? { error: "No Password Given.", field: 'pass' } | |
| : (username.length < 3) ? { error: "Username is less than 3 Characters.", field: 'name' } | |
| : (password.length < 4) ? { error: "Password is less than 4 Characters.", field: 'pass' } | |
| : (!/^([a-z0-9_-]+)$/i.test(username)) ? { error: "Username contains invalid characters.", field: 'name' } | |
| : false | |
| ); |
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
| #!/usr/bin/perl | |
| # Description: http://daringfireball.net/2010/08/open_urls_in_safari_tabs | |
| # License: See below. | |
| # http://gist.github.com/507356 | |
| use strict; | |
| use warnings; | |
| use URI::Escape; |