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 / main.go
Created August 15, 2023 23:49 — forked from majest/main.go
Sqlite with GORM using UUID
package main
import (
"database/sql"
sqliteGo "github.com/mattn/go-sqlite3"
uuid "github.com/satori/go.uuid"
log "github.com/sirupsen/logrus"
"gorm.io/driver/sqlite"
"gorm.io/gorm"
"gorm.io/gorm/logger"
@omaciel
omaciel / singleton.py
Created May 6, 2012 23:37
A Selenium WebDriver Singleton class
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: ts=4 sw=4 expandtab ai
from robot.api import logger
from robot.utils import asserts
from selenium import webdriver
class Singleton(object):
@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 / tips_and_tricks.md
Last active August 31, 2021 14:54
A collection of Python tips and tricks

Flatten a dictionary

  In [1]: k = {'name': 'Og Maciel', 'age': 40, 'mansions': '', 'kids': 3}
  In [2]: ' '.join("--{!s}={!r}".format(key,val) for (key,val) in k.iteritems())
  "--age=40 --kids=3 --name='Og Maciel' --mansions=''"

Run Unittest TestCase from IPython

@omaciel
omaciel / soundtrack.md
Last active December 23, 2020 14:36
I.C.Q. - A Novel: Soundtrack
Track Name Artist Year Genre
1 Fly Sugar Ray & Super Cat 1997 Rock
2 Mo Money Mo Problems (feat. Mase & Puff Daddy) [2014 Remastered Version] The Notorious B.I.G. 1997 Hip-Hop/Rap
3 Can't Nobody Hold Me Down (feat. Mase) Puff Daddy 1997 Hip-Hop/Rap
4 How Bizarre (Mix) OMC 1995 Rock
5 Ready or Not Fugees 1996 Hip-Hop/Rap
6 Here Comes the Hotstepper (Heartical Mix) Ini Kamoze 1994 Pop
7 1979 Smashing Pumpkins 1995 Hard Rock
8 U Can't Touch This MC Hammer 1990 Hip-Hop/Rap
@omaciel
omaciel / rst_to_md.sh
Last active December 8, 2020 17:47 — forked from ldong/rst_to_md.sh
Convert rst to md files
# This script was created to convert a directory full
# of rst files into md equivalents. It uses
# pandoc to do the conversion.
#
# 1. Install pandoc from http://johnmacfarlane.net/pandoc/
# 2. Copy this script into the directory containing the .rst files
# 3. Ensure that the script has execute permissions
# 4. Run the script
#
# By default this will keep the original .rst file
@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
@omaciel
omaciel / install_satellite6.sh
Last active November 12, 2020 07:14
Install Satellite 6 on EC2
#!/usr/bin/env sh
# Install Satellite 6 on to an Amazon EC2 instance. Make sure to set the variables
# in the head of this script.
set -o errexit -o nounset
# Default user for EC2 images is "ec2-user", so switch to "root"
sudo su -
# By default the EC2 instance's hostname matches its internal hostname. The
@omaciel
omaciel / quality.md
Last active November 12, 2020 07:13
Characteristics Of A Good Quality Engineer
Also, I would be grateful if you could give me some advice about the skills I need in order to have a career as a Quality Engineer.

I think that the most important skill a Quality Engineer (QE for short) should have is to always strive to deliver quality and never compromise on this goal. Sure, being flexible is just as important, and in order to position yourself in a place where you don't have to compromise on delivering quality, the second important skill is to always, always, do your homework and present facts (backed up with real data and numbers) about the current state of the product you're working on. Don't say things like "the product is too buggy" or "the usability is bad." Instead, focus on showing the type and number of issues you've encountered during your testing cycle or exploratory testing period. Show them numbers! Tell them instead, "our automation shows that feature X has failed Y number of tests out of a total of Z tests, which represents a percentage of P. Furthermore, since feat

Register both Satellite and Capsule systems

Run these commands on both Satellite and Capsule systems to properly register them to CDN and to remove Beaker repositories (only needed for Red Hat QE folks)

export USER_NAME=""
export USER_PASSWORD=""
export POOLID=""
export ADMIN_USER="admin"