Skip to content

Instantly share code, notes, and snippets.

Avatar

Steven rh0dium

View GitHub Profile
@rh0dium
rh0dium / docker-compose.yml
Created May 19, 2018
An envision with IP Verification Docker.
View docker-compose.yml
version: "3.1"
services:
app:
image: icmanage1/envision:envision_verification-latest
links:
- db
- perforce
- rabbitmq
- splunk
@rh0dium
rh0dium / docker-compose.yml
Last active May 18, 2018
A typical envision stack
View docker-compose.yml
version: "3.1"
services:
app:
image: icmanage1/envision:envision-latest
links:
- db
- perforce
- rabbitmq
- splunk
View docker-compose.yml
version: "3.1"
services:
app:
image: icmanage1/envision:ipcentral-latest
links:
- db
- perforce
env_file:
- .env
@rh0dium
rh0dium / .env
Last active May 20, 2018
Docker .ENV File
View .env
# Docker Additions
MYSQL_HOST=db
MYSQL_PORT=3306
MYSQL_ROOT_PASSWORD=password
MYSQL_ROOT_HOST=%
MYSQL_DATABASE=bugs
MYSQL_USER=icmAdmin
MYSQL_PASSWORD=password
@rh0dium
rh0dium / docker-compose.yml
Last active May 16, 2018
Basic Perforce / MariaDb IC Manage Server
View docker-compose.yml
version: "3.1"
services:
perforce:
image: icmanage1/envision:perforce-latest
networks:
main:
ipv4_address: 172.19.0.16
env_file:
- .env
@rh0dium
rh0dium / Calculate Effort Hours
Last active Aug 29, 2015
Effort is the measure of what changed divided by the time it took to do it (Man Hours). For this we use the following strategy. If it is programatic code we look at the absolute lines of code that was edited, added and deleted negating comments. In the event it is binary data we look at the absolute file size delta. We divide this by the man ho…
View Calculate Effort Hours
def calculate_effort_hours(**kwargs):
"""Calculate effort hours on a file change.
The best situation is that we have a lines_delta, on known file types (*.c, *.v, *.va, etc.)
In lieu of that use the file size as the file_delta. time_difference is how long the file
was checked out as reported in journal file."""
code_lines_add = kwargs.get('code_lines_add', 0)
code_lines_add = int(code_lines_add) if code_lines_add is not None else 0
code_lines_minus = kwargs.get('code_lines_minus', 0)
@rh0dium
rh0dium / Normalize Man Hours
Created Jun 4, 2015
Man hours is simply check-in time minus checkout-time. We normalize this to 8 hours per day (user modifiable) and exclude weekends. Additionally since a person cannot physically work on two files at the same time we divide it out by the number of files in the checkin. It is important to note that man hours is calculated AFTER the event takes pla…
View Normalize Man Hours
def normalize_man_hours(**kwargs):
"""
If the time_difference is less than 8 hours than return that.
If the time difference is greater than 8 hours we need to limit it to 8 hours per
day excluding weekends.
"""
hours, minutes, seconds = kwargs.get('time_difference', "0:0:0").split(":")
View user_list.html
{% extends "base.html" %}
{% comment %}
Author: Steven Klass <steven.klass@7stalks.com>
Copyright 2011-2013 Pivotal Energy Solutions. All rights reserved.
See the file LICENSE.txt for licensing information.
{% endcomment %}
{% block page_title %}Impersonate User List{% endblock %}
View base.py
LOGGING = {
'version': 1,
'disable_existing_loggers': True,
'formatters': {
'standard': {
'format': "[%(asctime)s] %(levelname)s [%(name)s.%(funcName)s:%(lineno)d] %(message)s",
'datefmt': "%d/%b/%Y %H:%M:%S"
},
},
'handlers': {
You can’t perform that action at this time.