Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View rodneyrehm's full-sized avatar

Rodney Rehm rodneyrehm

View GitHub Profile
@rodneyrehm
rodneyrehm / selenium-ondemand-testinfo.js
Created June 19, 2017 13:40
Sentry Raven injected test metadata
function addSeleniumTags () {
if (!window._SELENIUM_TEST_BUILD) {
return
}
Raven.setTagsContext({
'test.url': window._SELENIUM_BUILD_URL,
'test.job': window._SELENIUM_TEST_JOB,
'test.build': window._SELENIUM_TEST_BUILD,
'test.name': window._SELENIUM_TEST_NAME,
@rodneyrehm
rodneyrehm / output.txt
Last active June 12, 2017 17:21
vue-i18n - running the unit tests
os: macOS 10.12.5
node: 8.1.0
npm: 5.0.3
-----
➜ npm run test:unit
> vue-i18n@7.0.2 test:unit /Users/rodneyrehm/projects/test.dev/htdocs/vue-i18n
> BABEL_ENV=test karma start config/karma.unit.conf.js
@rodneyrehm
rodneyrehm / system-font.scss
Created June 2, 2017 09:56
Using system fonts on the web
html {
// 12px base unit (others usually make this 10px to simplify their calculations)
font-size: 75%;
}
body {
// will be 16px default font-size
font-size: 1.33rem;
line-height: 1.2;
// See: https://www.smashingmagazine.com/2015/11/using-system-ui-fonts-practical-guide/
@rodneyrehm
rodneyrehm / manual-overflow-scroll.js
Created January 10, 2017 20:41
Android 4.4 / Chrome 30 WebView: Manual Scrolling of overflow elements
// see https://bugs.chromium.org/p/chromium/issues/detail?id=294514 for an explanation of the problem, with a very helpful automatic archival
// If you use this "code" you're going to burn in a very special level of hell.
// A level they reserve for child molesters and people who talk at the theater.
function engageManualScrolling(element) {
var start = 0;
var handleStart = function(event) {
start = element.scrollTop + event.touches[0].pageY;
};
@rodneyrehm
rodneyrehm / full-height-column.css
Created November 16, 2016 11:14
CSS: full height column, allowing fixed-height header and footer and scrollable content
/*
<article class="full-height-column">
<header></header>
<section></section>
<footer></footer>
</article>
*/
.full-height-column {
display: flex;
@rodneyrehm
rodneyrehm / zencastr-keyboard.js
Created October 24, 2016 18:43
Zencastr Keyboard Toggle Microphone Mute
var container = document.querySelector('.lobby-user');
var unmutedIcon = document.querySelector('.user-meta .status .unmuted');
var mutedIcon = document.querySelector('.user-meta .status .muted');
var control = document.querySelector('.user-meta .status');
control.setAttribute('role', 'button');
control.setAttribute('tabindex', 0);
control.setAttribute('accesskey', 'm');
control.addEventListener('keydown', function(event) {
event.preventDefault();
@rodneyrehm
rodneyrehm / keybase.md
Created October 1, 2016 10:42
keybase.md

Keybase proof

I hereby claim:

  • I am rodneyrehm on github.
  • I am rodneyrehm (https://keybase.io/rodneyrehm) on keybase.
  • I have a public key ASBySsezflndeTbTHXcN0JDE4EVyoBRd3krTjyHtKaA5Mwo

To claim this, I am signing this object:

@rodneyrehm
rodneyrehm / output.html
Created August 12, 2016 09:37
markdown-it-adjust-heading-levels
<!-- { firstLevel: 3 } -->
<h3>First <em>Level</em> headline</h3>
<p>first level content</p>
<h4>Second Level headline alpha</h4>
<p>second level content alpha</p>
<h5>Third Level headline alpha</h5>
<p>third level content alpha</p>
<h4>Second Level headline bravo</h4>
<p>second level content bravo</p>
@rodneyrehm
rodneyrehm / tampermonkey.noopener.js
Created July 21, 2016 16:20
TamperMonkey: force noopener for window-spawning links (Google Chrome)
// ==UserScript==
// @name force noopener for window-spawning links
// @namespace *
// @version 0.1
// @description adds rel="noopener" to <a href="…" target="_blank">
// @author Rodney Rehm
// @match http://*/*
// @grant none
// ==/UserScript==
@rodneyrehm
rodneyrehm / readme.md
Last active July 25, 2016 21:43
BrowserStack: IE10 click problem

I have a functional test failing in IE10/Win8 on BrowserStack which has been driving me crazy. I ended up adding a few log statements to dojo/request/node in order to narrow down the problem.

The first code block shows .findById("first").click().end() that works fine (test), the second code block shows the problem (test). The request is taking ages and eventually fails.

The BrowserStack config is reduced to IE10 and IE11 and the only suite that is executed is [element.disabled.test.js](https://github.com/medialize/ally.js/blob/browserstack/ie10-click-problem/test/functional/element.disabled.test.js