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
install | |
lang en_GB.UTF-8 | |
keyboard us | |
timezone --utc GMT | |
auth --useshadow --enablemd5 | |
selinux --disabled | |
firewall --disabled | |
services --enabled=NetworkManager,sshd | |
eula --agreed |
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 | |
. /etc/os-release | |
IMAGE="container-demo.img" | |
die() { echo "FATAL: $@" >&2 ; exit 1 ; } | |
info() { echo "INFO: $@" ; } | |
install_dependencies() { |
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 | |
from __future__ import print_function | |
from ast import literal_eval | |
from argparse import ArgumentParser | |
import urllib2 | |
BASE_URL = "https://{jenkins}/job/%s/%s" |
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
javascript:(function(){ | |
function copyTextToClipboard(text) { | |
var textArea = document.createElement("textarea"); | |
textArea.style.position = 'fixed'; | |
textArea.style.top = 0; | |
textArea.style.left = 0; | |
textArea.style.width = '2em'; | |
textArea.style.height = '2em'; | |
textArea.style.padding = 0; | |
textArea.style.border = 'none'; |
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 textblob import TextBlob | |
from tweepy import API | |
from tweepy import OAuthHandler | |
import config | |
import logging | |
LOGGER = logging.getLogger("twentiment") | |
logging.basicConfig( | |
level=logging.INFO, |
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
#! /env/bin/python | |
# https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#get-change-detail | |
# https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html | |
# #add-reviewer | |
# https://review.openstack.org/Documentation/cmd-set-reviewers.html | |
""" | |
user1 to review [user2, user3] | |
user2 to review [user1, user3] |
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 tweepy import API | |
from tweepy import Stream | |
from tweepy import OAuthHandler | |
from tweepy.streaming import StreamListener | |
import os | |
import re | |
import urllib2 | |
C_KEY = os.environ['C_KEY'] |
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 SPOTIPY_REDIRECT_URI='http://localhost:8888/callback' | |
export SPOTIPY_CLIENT_ID={API_CLIENT_ID} | |
export SPOTIPY_CLIENT_SECRET={API_CLIENT_SECRET} | |
''' | |
import collections | |
import math | |
import spotipy | |
import spotipy.util as util |
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
def main(): | |
global shared_directory, rhel_version, rhevm_version, workspace, \ | |
mount_directory_name, tmp_directory_name | |
parser = argparse.ArgumentParser( | |
description='Retrieve the latest ova image for rhevm appliance') | |
parser.add_argument('--shared-dir', nargs='?', default=shared_directory, | |
help='Shared directory where to store the image ' | |
'(Default: %s)' % shared_directory) | |
parser.add_argument('--rhel-version', nargs='?', default=rhel_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
class VirtualMethod(object): | |
# some magic to bind an XML-RPC method to an RPC server. | |
# supports "nested" methods (e.g. examples.getStateName) | |
# supports named arguments (if server does) | |
def __init__(self, func, name): | |
self.__func = func | |
self.__name = name | |
def __getattr__(self, name): | |
return type(self)(self.__func, "%s.%s" % (self.__name, name)) | |
def __call__(self, *args, **opts): |