Skip to content

Instantly share code, notes, and snippets.

Avatar

Joacim de la Motte jlowgren

View GitHub Profile
@jlowgren
jlowgren / unSticky.js
Last active Sep 23, 2019 — forked from frippz/unSticky.js
Un-sticky toolbars and kill fixed elements bookmarklet, and possibly re-enable scrolling of the page
View unSticky.js
const elements = document.querySelectorAll('body *');
const body = document.querySelector('body');
if (getComputedStyle(body).overflow === 'hidden') {
body.style.overflow = "unset";
}
elements.forEach((element) => {
if (['-webkit-sticky', 'sticky'].includes(getComputedStyle(element).position)) {
element.style.position = 'unset';
@jlowgren
jlowgren / update-gems.sh
Last active Aug 14, 2016
Only attempt to update outdates Ruby gems
View update-gems.sh
#!/bin/sh
# 1. List outdated gems
# 2. Remove everything after whitespace on each line
# 3. Translate newlines into whitespaces
gem update `gem outdated | cut -d ' ' -f 1 | tr '\n' ' '`