Skip to content

Instantly share code, notes, and snippets.

@jodelamo
jodelamo / unSticky.js
Last active September 23, 2019 12:51 — forked from frippz/unSticky.js
Un-sticky toolbars and kill fixed elements bookmarklet, and possibly re-enable scrolling of the page
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';
@jodelamo
jodelamo / update-gems.sh
Last active August 14, 2016 15:09
Only attempt to update outdates Ruby gems
#!/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' ' '`