Skip to content

Instantly share code, notes, and snippets.

@5im-0n
5im-0n / rot13.js
Created December 14, 2017 15:40
rot13 bookmaklet
(function() {
function convert(inText) {
var outText = '';
var t;
for (i = 0; i < inText.length; i++) {
t = inText.charCodeAt(i);
if ((t > 64 && t < 78) || (t > 96 && t < 110)) {
t += 13;
} else if ((t > 77 && t < 91) || (t > 109 && t < 123)) {
t -= 13;
@5im-0n
5im-0n / activetable.js
Created March 17, 2016 12:43 — 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
@5im-0n
5im-0n / pre-receive-puppet
Last active August 26, 2015 16:09 — forked from hartfordfive/pre-receive-puppet
Server-side pre-receive hook to validate puppet files.
#!/bin/bash
COMMAND='puppet parser validate'
TEMPDIR=`mktemp -d`
echo "### Attempting to validate puppet files... ####"
# See https://www.kernel.org/pub/software/scm/git/docs/githooks.html#pre-receive
oldrev=$1
newrev=$2
You appear to be advocating a new:
[ ] cloud-hosted [ ] locally installable [ ] web-based [ ] browser-based [ ] language-agnostic
[ ] language-specific IDE. Your IDE will not succeed. Here is why it will not succeed.
You appear to believe that:
[ ] Syntax highlighting is what makes programming difficult
[ ] Garbage collection is free
[ ] Computers have infinite memory
[ ] Nobody really needs: