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/env python | |
import pyrax | |
pyrax.set_setting('identity_type', 'rackspace') | |
pyrax.set_credentials('myusername', 'myapikey', region='DFW') | |
def server_list_generator(detailed=True, search_opts=None, limit=None): | |
servers = pyrax.cloudservers.servers.list(detailed=detailed, | |
search_opts=search_opts, | |
limit=limit) |
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
certs: | |
www_example_com: | |
key: | | |
-----BEGIN RSA PRIVATE KEY----- | |
MIIEowIBAAKCAQEA0cfBegr0ahA1PXrF3fBJURcBxoP8PZow1a6tRGe3ruJZBMSH | |
vx2+dm2Sq3bCPHH2hUkC0Oj2U+54WMzn22ZwVsgOPG7ks1EqKy48K5VPrWDMJqjn | |
MhxLpTaf6xaGUlkVA6xcO5+SNFqzkq8fFWSHmY+E3n03ym0zH/Loy1KYRI0xVPRq | |
ITp7AoPbJ58Lz1X9CgBd7siaVjPvaS6WfosLwlI8gr1h6vqeO7nPrF8B9HnV7867 | |
bSZlkbb6vqgtLg73B4diRGvNn5X9Kpsi1jbp7DAXHj2pGA8kr8TjV6MG28Di/iWL | |
oyiBDziIHe7iV0my+wl12x6o5JTuVVMkbD57AQIDAQABAoIBAB3ysoBFyBbMMY2R |
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
sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
sudo yum install -y golang git mercurial make bzr | |
export GOPATH=~/Go | |
export PATH=$PATH:$GOPATH/bin | |
mkdir $GOPATH | |
go get github.com/drone/drone | |
cd $GOPATH/src/github.com/drone/drone | |
make deps | |
make vendor | |
make clean |
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
import os | |
import sys | |
import smtplib | |
def mail(subject='Ansible Command', sender='<root>', to='root', cc=None, | |
bcc=None, body=None): | |
if not body: | |
body = subject |
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
pip install git+https://github.com/ansible/ansible.git@devel#egg=ansible | |
pip install git+https://github.com/sivel/ansible-testing.git#egg=ansible_testing | |
git clone https://github.com/ansible/ansible-modules-core.git | |
ansible-validate-modules ansible-modules-core |
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
from openstack.auth.identity.v2 import Password | |
class ApiKey(Password): | |
valid_options = { | |
'access_info', | |
'auth_url', | |
'username', | |
'user_id', | |
'password', |
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/env python | |
# (c) 2015, Matt Martz <matt@sivel.net> | |
# | |
# This file is part of Ansible. | |
# | |
# Ansible 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 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
<?php | |
function perm_test() { | |
$file = '.perm_test'; | |
@touch( $file ); | |
if ( ! is_readable( $file ) ) | |
return false; | |
$perms = array( 0666, 0664, 0644, 0660, 0640, 0600, 0444, 0440, 0400 ); | |
$lastperm = 0666; |
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/python | |
import urllib, re, sys | |
def content_match(url, match, nocase): | |
uh = urllib.urlopen(url) | |
if re.search(match, uh.read(), re.I if nocase else 0) and uh.getcode() == 200: | |
return [True, uh.geturl(), uh.getcode()] | |
else: | |
return [False, uh.geturl(), uh.getcode()] |
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
#!/bin/bash | |
TAGSURL='http://core.svn.wordpress.org/tags/' | |
STABLETAG=`curl -s $TAGSURL | awk -F '">' '{print $2}' | awk -F"/<" '{print $1}' | egrep "^[0-9].[0-9]" | sort -n | tail -n 1` | |
if [ $STABLETAG == '' ] | |
then | |
echo "Stable tag not found, exiting..." | |
exit 1 | |
fi | |
for ADDON in `ls -1d /home/user/sites/*/` | |
do |
OlderNewer