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/env bash | |
JSON=`jq -n ".auth.passwordCredentials.password = \"$OS_PASSWORD\" | .auth.passwordCredentials.username = \"$OS_USERNAME\" | .auth.tenantName = \"$OS_TENANT_NAME\""` | |
CREDS=`curl -s "$OS_AUTH_URL/tokens" -X POST -H "Content-Type: application/json" -d "$JSON"` | |
TOKEN=`echo $CREDS | jq -r .access.token.id` | |
#echo $TOKEN | |
TENANT_ID=`echo $CREDS | jq -r .access.token.tenant.id` | |
ENDPOINT=`echo $CREDS | jq -r '.access.serviceCatalog[] | select(.type == "compute").endpoints[0].publicURL'` | |
#NET="98a334b9-59fe-417c-8230-7a89a85b4701" |
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
# Add this snippet to the top of your playbook. | |
# It will install python2 if missing (but checks first so no expensive repeated apt updates) | |
# [email protected] | |
- hosts: all | |
gather_facts: False | |
tasks: | |
- name: install python 2 | |
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal) |
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/python | |
DOCUMENTATION = ''' | |
--- | |
module: github_repo | |
short_description: Manage your repos on Github | |
''' | |
EXAMPLES = ''' | |
- name: Create a github Repo |
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/python | |
DOCUMENTATION = ''' | |
--- | |
module: github_repo | |
short_description: Manage your repos on Github | |
''' | |
EXAMPLES = ''' | |
- name: Create a github Repo |
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
sync; echo 3 > /proc/sys/vm/drop_caches |
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 random | |
def random_walk(n): | |
"""Return coordinates after 'n' block random walk.""" | |
x=0 | |
y=0 | |
for i in range(n): | |
step = random.choice(['N','S','E','W']) | |
if step == 'N': | |
y = y + 1 |
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 | |
sudo apt-get update | |
sudo apt-get -y install libssl0.9.8 | |
wget http://download.utorrent.com/linux/utorrent-server-3.0-25053.tar.gz | |
sudo tar zxvf utorrent-server-3.0-25053.tar.gz -C /opt/ | |
sudo chmod -R +x /opt/utorrent-server-v3_0/ | |
/opt/utorrent-server-v3_0/utserver -settingspath /opt/utorrent-server-v3_0/ & |
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 | |
#https://www.unixmen.com/install-openvpn-asaccess-server-on-ubuntu-debian/ | |
VERSION=2.1.4 | |
wget http://swupdate.openvpn.org/as/openvpn-as-$VERSION-Ubuntu12.amd_64.deb | |
sudo dpkg -i openvpn-as-$VERSION-Ubuntu12.amd_64.deb | |
sudo su - root -c "echo openvpn:$1 | chpasswd" |
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
heat_template_version: 2014-10-16 | |
description: A simple server to run Jenkins | |
parameters: | |
key_name: | |
type: string | |
default: honey | |
description: Name of an existing key pair to enable SSH access to the instance. | |
NetID: | |
default: 335662a3-2d21-40f0-9c59-93f1f123f33f |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.