Skip to content

Instantly share code, notes, and snippets.

View omaciel's full-sized avatar
🎯
Learning

Og Maciel omaciel

🎯
Learning
View GitHub Profile
@omaciel
omaciel / .emacs
Last active February 19, 2016 15:36
Emacs configuration for Python development. Simply drop this file inside your $HOME/.emacs.d directory and enjoy it!
;;; package --- Emacs configuration for Python developement
;;; Commentary:
;;; Code:
;; Disable a couple of menus and startup message
(if (fboundp 'menu-bar-mode) (menu-bar-mode -1))
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
(setq inhibit-startup-message t)
@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.
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: ts=4 sw=4 expandtab ai
from base import Base
from lib.common.helpers import csv_to_dictionary
class Org(Base):
@omaciel
omaciel / gist:7569869
Last active December 28, 2015 22:09
Moving around Foreman's menus
import lib.ui.login
from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
browser = webdriver.Firefox()
browser.get("https://qetello01.usersys.redhat.com")
login = lib.ui.login.Login(browser)
login.login('admin', 'changeme')
@omaciel
omaciel / gist:7484744
Created November 15, 2013 14:03
Patch for getting a localized Firefox
diff --git a/tests/ui/baseui.py b/tests/ui/baseui.py
index 7dd47a1..f84551a 100644
--- a/tests/ui/baseui.py
+++ b/tests/ui/baseui.py
@@ -42,9 +42,16 @@ class BaseUI(unittest.TestCase):
self.logger = logging.getLogger("robottelo")
self.logger.setLevel(self.verbosity * 10)
+ # This only works for Firefox
+ if self.driver_name.lower() == 'firefox':
@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 / 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")
import argparse
import boto.ec2
import os
import paramiko
import sys
import tempfile
import time
from urllib import urlopen
@omaciel
omaciel / report.py
Last active December 22, 2015 18:39
from scout import *
import argparse
import sys
JENKINS_BRN = 'http://smqa-r210-01.lab.eng.brq.redhat.com:8080/job'
JENKINS_RDU = 'http://hudson.rhq.lab.eng.bos.redhat.com:8080/hudson/job'
PLAN_COVERAGE = [
{'name': 'katello-api-pyCoverage', 'url': JENKINS_BRN},
@omaciel
omaciel / sam_stress.csv
Last active December 22, 2015 02:09
Stress test results for SAM
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
RELEASE: 1.3
DATE: 2013-09-25
Organizations
-------------
200 0.566021 0.267278 0.138487 0.090077 0.086591 2.69
Systems
-------
200 1.340439 0.73645 0.340358 0.272603 0.273094 4.29