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
| #!/bin/bash | |
| if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then | |
| echo "Usage: $0 <dir_path> <number_of_files> <block_size>" | |
| echo "parameters" | |
| echo " - dir_path Directory path where the tests files will be created." | |
| echo " - number_of_files The max number of files to be created at dir_path location." | |
| echo " - block_size The Size of each test file in Kilobyte[K], Megabyte[M], Gigabyte[G]." | |
| else | |
| path=$1 | |
| limit=$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
| import requests | |
| import json | |
| auth_payload = { | |
| "auth": { | |
| "identity": { | |
| "methods": [ | |
| "token" | |
| ], |
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 argparse | |
| import requests #needs to be installed | |
| import json | |
| parser = argparse.ArgumentParser(description='Get data of your project from your object storage service.') | |
| parser.add_argument('--user', type=str, required=True, help='Portal customer account') | |
| parser.add_argument('--password', type=str, required=True, help='Portal customer password') | |
| parser.add_argument('--project', type=str, required=True, help='User project ID. \n') | |
| parser.add_argument('--endpoint', type=str, required=True, help='Endpoint where the request are going to be done.\n' | |
| 'Requires protocol and port. \n' |
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
| #!bin/python | |
| import bcrypt | |
| hash = b"Thistextwillbehashed" | |
| hashed = bcrypt.hashpw(hash, bcrypt.gensalt()) | |
| print(hashed) |
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
| export OS_USERNAME= <User email> | |
| export OS_TOKEN= <Openstack auth TOKEN> | |
| export OS_TENANT_ID= <Project-ID> | |
| export OS_AUTH_URL=https://api-endpoint:5000/v3 | |
| export OS_AUTH_TYPE=token | |
| export OS_IDENTITY_API_VERSION=3 | |
| export OS_INTERFACE=public |
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
| Python connections to databases |
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
| from keystoneauth1.identity import v3 | |
| from keystoneauth1 import session | |
| from troveclient.v1 import client as Trove | |
| resources = {} | |
| class Auth: | |
| def __init__(self): | |
| username = "username" | |
| password = "password" |
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
| Windows Registry Editor Version 5.00 | |
| [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_1af4&dev_1001&subsys_00000000] | |
| "Service"="viostor" | |
| "ClassGUID"="{4D36E97B-E325-11CE-BFC1-08002BE10318}" | |
| [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\CriticalDeviceDatabase\pci#ven_1af4&dev_1001&subsys_00020000] | |
| "Service"="viostor" | |
| "ClassGUID"="{4D36E97B-E325-11CE-BFC1-08002BE10318}" |
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
| #!/bin/bash | |
| for i in $(grep "^[^#;]" /etc/ssh/sshd_config); do | |
| echo $i | |
| for s in ChallengeResponseAuthentication PasswordAuthentication PermitRootLogin X11Forwarding;do | |
| echo $s | |
| if [[ $i == "$s"* ]]; then | |
| echo $i; | |
| echo $s; | |
| sed -i "s/$s .*/$s no/g" /etc/ssh/sshd_config; | |
| fi; |
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
| #!/bin/bash | |
| for i in $(grep "^[^#;]" /etc/ssh/sshd_config); do | |
| echo $i | |
| for s in ChallengeResponseAuthentication PasswordAuthentication PermitRootLogin X11Forwarding GSSAPIAuthentication;do | |
| echo $s | |
| if [[ $i == "$s"* ]]; then | |
| echo $i; | |
| echo $s; | |
| sed -i "s/$s .*/$s no/g" /etc/ssh/sshd_config; | |
| fi; |
OlderNewer