I hereby claim:
- I am fbender on github.
- I am fbender (https://keybase.io/fbender) on keybase.
- I have a public key whose fingerprint is 65AE C8A5 9890 99CC 951C 8CC2 38A5 7375 EFD0 B4D8
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| // License: MIT | |
| // Wrote this to help me with merging two spreadsheets using a WinMerge diff report. This is in no way optimized. | |
| // The report HTML only requires adding the JS and desired CSS for the toggled state, e.g.: | |
| // <style>span.toggled{background-color:lightcyan !important;}</style> | |
| // Gecko-based browsers with context menu support have "Import" and "Export" items added to their context menu. | |
| "use strict"; | |
| function getNodes(selector) { | |
| var nodelist = document.querySelectorAll(selector); |
| validInt = '^\d+$'; | |
| ri = regexp(value, validInt); | |
| if size(ri, 2) == 1 | |
| % integer | |
| end | |
| validDouble = '^(\d+(\.\d*)?|\.\d+)[dD][+-]?\d{1,3}$'; | |
| rd = regexp(value, validDouble); |
| function b64 = base64( str ) | |
| %BASE64 Encode string (array of chars) into Base64 | |
| % Currently seems to fail for any input > 4 characters. :( | |
| %% Settings | |
| % Valid output codes to choose from. | |
| base64Chars = char([65:90, 97:122, 48:57, 43, 47]); % +/ per RFC 2045 et al. | |
| %base64UrlChars = char([65:90, 97:122, 48:57, 45, 95]); % -_ per RFC 4648 §4 | |
| base64PadChar = '='; |
(This is an extension to my proposal for the NetworkInformation.type enum at w3c/netinfo#9 to cover edge cases. Licensed as CC0 / public domain.)
The Network Information API is designed to allow websites / WebApps to change their behaviour depending on the type of connection their device has. Discriminating by whether you are currently connected via WiFi or 3G, however, provides a footgun to developers: E.g. when you are roaming and tethering to your smartphone but your device indicates it's on a WiFi connection, you may assume that the user is on a high-bandwith, low-latency, low-cost connection
| #!/bin/bash | |
| # license: MIT | |
| # author: Florian Bender | |
| # original script: Sasquatch (https://forums.virtualbox.org/viewtopic.php?f=7&t=44337#p199593) | |
| # see comment below! | |
| version=$(vboxmanage -v) | |
| echo -n "Installed: $version; " | |
| var1=$(echo $version | cut -d 'r' -f 1) |
| #!/bin/bash | |
| # Copyright (c) 2013 Florian Bender | |
| # License: MIT (see http://opensource.org/licenses/MIT) | |
| function colorset { | |
| style="" | |
| case $1 in | |
| text) style="0;3" ;; ## regular text | |
| HItext) style="0;9" ;; ## high intensity regular text |