Skip to content

Instantly share code, notes, and snippets.

@UInIQ
UInIQ / diffall.sh
Last active May 3, 2023 15:47
git diffall - runs a diff between the currently active branch and all other local branches simultaneously, either for all files or the specified one.
#!/bin/bash
function diffall {
unset MATCH
unset DIFFALL_TERMINATE
DIFFALL_TERMINATE=0
MODIFIED="M"
WHITESPACE="-w --ignore-blank-lines"
INCLUDING=""
EXCLUDING=""
@UInIQ
UInIQ / limerick.license.md
Created September 28, 2021 01:15 — forked from NerdyDeedsLLC/limerick.license.md
License Type: Offensive Limerick (used on all my open source code since 2012)

LICENSE TYPE: OFFENSIVE LIMERICK

There once was a Dev from East Mass.,
who wished to ensure his code could be passed.
Feeling most license types,
  weren't worth all the hype
Wrote his own as an iconoclast.

His peers thought him a narcissist,
@UInIQ
UInIQ / XLSX.htm
Created March 25, 2019 02:37
XLSX Upload and Covert to JSON
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>title</title>
</head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.8.0/jszip.js"></script>
@UInIQ
UInIQ / modifier.css
Last active March 24, 2019 19:28
Contemporary Google Mod - Adds a Contemporarily Link and Dropdown Menu to Google's Primary UI, so results can be limited to 1, 2, 3, 5, and 10-year ranges
.contemp-link > .contemporary-menu {
display:none;
}
.contemp-link:hover > .contemporary-menu {
display:block;
}
.contemporary-menu {
position: absolute;
@UInIQ
UInIQ / rc.html
Created September 14, 2018 21:42
Random Color Emitter and Hex→RGBA/RGBA→Hex color converter
<div id="op"></div>
@UInIQ
UInIQ / rc.html
Created September 14, 2018 21:42
Random Color Emitter and Hex→RGBA/RGBA→Hex color converter
<div id="op"></div>
alias edit="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
@UInIQ
UInIQ / solution1.js
Last active July 7, 2018 19:31
Responding to @ptdecker's challenge
var stringToPermute="ABC";
function iterativePermute(str, sIndex=0, strLength=(str.length-1)) {
if (sIndex == strLength) console.log(str); // Recursive call; means we gotta new match. Cram it into the stack
else { // Otherwise...
for (let i = sIndex; i <= strLength; i++) { // From teh next shortest starting index...
str = transposeChars(str, sIndex, i); // Swap out chars at the current starting index with the one at the end
iterativePermute(str, sIndex + 1, strLength); // Recall this self-same function to log the result and kick off again
}
}
@UInIQ
UInIQ / bit_operators.js
Created June 27, 2018 22:57
Logical Operators
function id(x) {
// id :: a -> a
return x
}
// v :: (a -> Bool) -> Bool -> [a] -> Bool
//return ((predicate === true) ? Bool : !Bool);
function v(pred, bool, xs) {
for (var i = 0; i < xs.length; i++) {
if (pred(xs[i]) === bool) {
@UInIQ
UInIQ / caesar-cipher.sh
Created May 24, 2018 09:09 — forked from IQAndreas/caesar-cipher.sh
A really simple Caesar Cipher in Bash (or Shell) using `tr`, can also easily be adjusted to encrypt/decrypt ROT13 instead.
# Caesar cipher encoding
echo "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" | tr '[A-Z]' '[X-ZA-W]'
# output: QEB NRFZH YOLTK CLU GRJMP LSBO QEB IXWV ALD
# Caesar cipher decoding
echo "QEB NRFZH YOLTK CLU GRJMP LSBO QEB IXWV ALD" | tr '[X-ZA-W]' '[A-Z]'
# output: THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG
# Can also be adjusted to ROT13 instead