Skip to content

Instantly share code, notes, and snippets.

View GLMeece's full-sized avatar

Greg Meece GLMeece

View GitHub Profile
@GLMeece
GLMeece / runtime_os_info.py
Last active August 8, 2023 06:09
Get OS info at runtime
#!/usr/bin/env python
import os
import platform
"""
Utility functions for determining Operating System info at runtime.
- *Module*: runtime_os_info
- *Platform*: Unix, Mac, Windows
@GLMeece
GLMeece / robot_framework_doc_css_tweaks.md
Last active March 23, 2017 03:53
CSS Tweaks for Robot Framework's documentation tools (the testing reports, LibDoc and TestDoc)

CSS Tweak

If you wish to tweak the CSS in the reports, you'll probably want to modify the Python Lib directory's robot/htmldata/rebot/common.css file (for Linux, this is usually located in /usr/local/lib/python2.7/dist-packages; in Windows it's usually C:\Python27\Lib\site-packages). I prefer the Open Sans font, so I add the following at the top of this file:

@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700,700italic);

Then, I replace 'Helvetica' with 'Open Sans' in the body's font-family declaration.

@GLMeece
GLMeece / latency_numbers.md
Last active February 22, 2025 10:46
Latency Numbers Every Programmer Should Know - MarkDown Fork

Latency Comparison Numbers

Note: "Forked" from Latency Numbers Every Programmer Should Know

Event Nanoseconds Microseconds Milliseconds Comparison
L1 cache reference 0.5 - - -
Branch mispredict 5.0 - - -
L2 cache reference 7.0 - - 14x L1 cache
Mutex lock/unlock 25.0 - - -
@GLMeece
GLMeece / find_dup_ids.js
Created January 12, 2017 16:58
Find Duplicate IDs on a Web Page
javascript:(function () {
var ids = {};
var found = false;
$('[id]').each(function() {
if (this.id && ids[this.id]) {
found = true;
console.warn('Duplicate ID #'+this.id);
}
ids[this.id] = 1;
});
@GLMeece
GLMeece / Windows_RF_Setup.md
Last active November 16, 2022 18:09
Windows Selenium Testing Setup for Robot Framework Use

Windows Users

Windows Bit-version Assumption

  • Execution is on a 64-bit version of Windows. To maintain continuity, we will be keeping almost everything "bit-aligned" so that executables and libraries will all be 64-bit.
  • The one possible exception to this is for Internet Explorer's Selenium Driver. See why that is below.

Configure Environment

  1. Download the appropriate browser drivers: