Skip to content

Instantly share code, notes, and snippets.

@madivad
madivad / activetable.js
Created October 26, 2019 05:27 — forked from stevesouders/activetable.js
ActiveTable is a bookmarklet that makes any table sortable. It also allows you to remove columns, and it remembers the removed columns for next time. Use alt+click to UNhide all columns (and clear memory). To use it, create a bookmark called "ActiveTable" that has this URL: javascript:(function(){ var jselem=document.createElement('SCRIPT'); jse…
// ActiveTable - a bookmarklet to make tables sortable and editable
function init() {
var aHrows = getHrows();
var numHrows = aHrows.length;
var aHidden = getHiddenColumns();
ATpopup = document.createElement("div");
ATpopup.style.cssText = "position: absolute; visibility: hidden; padding: 0; font-family: Arial; background-color: rgba(255, 255, 255, 0.9); border-radius: .5em; text-align: center; box-shadow: .05em .05em .5em #00C;";
ATpopup.innerHTML = "<a href='sort' title='sort' onclick='sortColumn(); return false'><img border=0 src='http://stevesouders.com/images/sort_up_down.png' style='padding-top: 0.2em;'></a><br><a href='hide' style='color: #C00; font-family: monospace; font-size: 1.5em; text-decoration: none;' title='hide' onclick='hideColumn(); return false'>x</a>"; // TODO - use protocol-less URL for img
@madivad
madivad / words.py
Created April 29, 2019 23:11
counting letters and creating random plot
words=["ABCDEFG","ABBACUS","BANANA","BLACKBERRY","CACTUS","DREADED"]
import collections
count = collections.defaultdict(dict)
for word in words:
for letter in word: