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
| import mysql.connector | |
| uuids = [] | |
| class MySQLCursorDict(mysql.connector.cursor.MySQLCursor): | |
| def _row_to_python(self, rowdata, desc=None): | |
| row = super(MySQLCursorDict, self)._row_to_python(rowdata, desc) | |
| if row: | |
| return dict(zip(self.column_names, row)) | |
| return None | |
| cnx = mysql.connector.connect(host="localhost", user="glance", passwd="", db="glance") |
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 -w | |
| # | |
| # check_ssl_certificate | |
| # Nagios script to check ssl certificate expirations | |
| # | |
| # Copyright (c) 2006-2008 David Alden <[email protected]> | |
| # | |
| # 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 2 |
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
| # knife cheat | |
| ## Search Examples | |
| knife search "name:ip*" | |
| knife search "platform:ubuntu*" | |
| knife search "platform:*" -a macaddress | |
| knife search "platform:ubuntu*" -a uptime | |
| knife search "platform:ubuntu*" -a virtualization.system | |
| knife search "platform:ubuntu*" -a network.default_gateway |
NewerOlder