Skip to content

Instantly share code, notes, and snippets.

View elyezer's full-sized avatar

Elyézer Rezende elyezer

View GitHub Profile
@omaciel
omaciel / firefox_webdriver.py
Created November 10, 2013 16:40
Starts up Firefox using a language locale
from selenium import webdriver
profile = webdriver.firefox.firefox_profile.FirefoxProfile()
profile.set_preference("intl.accept_languages", "fr")
browser = webdriver.Firefox(profile)
browser.get("http://google.com")
@omaciel
omaciel / chrome_webdriver.py
Created November 11, 2013 18:05
Starts up Google Chrome using a language locale.
from selenium import webdriver
capabilities = webdriver.chrome.options.DesiredCapabilities.CHROME
capabilities["intl.accept_languages"] = "fr"
options = webdriver.chrome.options.Options()
options.add_experimental_option("intl.accept_languages", "fr")
driver = webdriver.Chrome(desired_capabilities=capabilities)
driver = webdriver.Chrome(chrome_options=options)
@omaciel
omaciel / gist:7811339
Last active July 17, 2024 15:26
Proposed Git and Development workflow for Robottelo

How To Contribute

Every open source project lives from the generous help by contributors that sacrifice their time and Robottelo is no different.

To make participation as pleasant as possible, this project adheres to the `Code of Conduct`_ by the Python Software Foundation.

Here are a few hints and rules to get you started:

  • Add yourself to the AUTHORS.rst_ file in an alphabetical fashion.
@omaciel
omaciel / sprint_report.py
Last active August 29, 2015 13:58
Reports on results for an automation milestone (sprint) for Robottelo
from collections import defaultdict
from functools import partial
import sys
try:
from github import Github
except ImportError:
print "Install PyGithub: sudo pip install PyGithub"
sys.exit(-1)
@omaciel
omaciel / gist:11319054
Last active June 8, 2016 17:59
Configure Foreman Smart Proxy with all features baked in
# Figure out what OS version we're running
if uname -r | grep -q el6; then export OS_VERSION=6; else export OS_VERSION=7; fi
# Install libvirt
yum install -y libvirt
if [ $OS_VERSION -eq 6 ]
then
service libvirtd start
chkconfig libvirtd on
@omaciel
omaciel / gist:2115b886b644409c4e28
Last active August 29, 2015 14:01
Configuring a 389-DS server with VNC access

Setting up a 389-DS Server

Installing needed pieces

Assuming you have a RHEL box:

# Subscribe box to get content
@fmasanori
fmasanori / jogos.py
Last active October 30, 2022 00:00
World Cup in six lines of Python 3. Jogos da Copa do Mundo em cinco linhas de Python 3.
import requests
jogos = requests.get('http://worldcup.sfg.io/matches').json()
for jogo in jogos:
if jogo['status'] in ('completed', 'in progress'):
print (jogo['home_team']['country'], jogo['home_team']['goals'], 'x',
jogo['away_team']['country'], jogo['away_team']['goals'])
@omaciel
omaciel / proxy.sh
Last active August 29, 2015 14:04
Configure Satellite to connect to a proxy
# Block non-proxy traffic from your katello server
# The following environment variables must be set:
# SQUID: the FQDN for your proxy
# PROXY_USERNAME: username for squid
# PROXY_PASSWORD: password for your squid username
export ETH=$(ping -c 1 $(hostname) | grep 'icmp_seq' | awk -F '(' '{print $2}' | awk -F ')' '{print $1}')
export PROXY=$(ping -c 1 $SQUID | grep 'icmp_seq' | awk -F '(' '{print $2}' | awk -F ')' '{print $1}')
@omaciel
omaciel / 00-readme.md
Last active January 19, 2023 15:42
Create Host Collection and Activation Keys, associating them as well as adding all available subscriptions to the Activation Key for a scenario where you have enabled and synchronized RHEL 5/6/7 i386, x86_64, ppc64 and s390x repositories.

Instructions

Please update 01-credentials.sh to include your credentials, and run these scripts in the order shown below:

  • 01-credentials.sh
  • 02-os-versions.sh
  • 03-initial-configuration.sh
  • 04-enable-content.sh
  • 05-content-views.sh
@omaciel
omaciel / instructions.md
Created November 21, 2014 20:45
Configuring Docker as Compute Resource for Satellite 6
  • Enable the "Extras" Red Hat channel so you can install Docker ...
#subscription-manager repos --enable rhel-7-server-extras-rpms
  • ... and install it
# yum install -y docker