This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
isJSON( sIn ){ | |
let isVal = false | |
try { isVal = typeof (JSON.parse( sIn )) } catch ( er ) { } | |
return ( isVal == "object" ) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FlickPatch { // Flick Carousel ARIA-HIDDEN observer | |
constructor(_d, _sQ) { | |
this._d = _d; this._sQ = _sQ; | |
this.aF = []; this.aObs = []; | |
} | |
init() { // | |
this.aF = Array.from( this._d.querySelectorAll( this._sQ )) | |
if( this.aF.length ){ | |
this.aObs = [] | |
this.aF.forEach( ( eF )=>{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let aTiny = {"a":"ᵃ","b":"ᵇ","c":"ᶜ","d":"ᵈ","e":"ᵉ","f":"ᶠ","g":"ᵍ","h":"ʰ","i":"ᶦ","j":"ʲ","k":"ᵏ","l":"ᶫ","m":"ᵐ","n":"ᶰ","o":"ᵒ","p":"ᵖ","q":"ᑫ","r":"ʳ","s":"ˢ","t":"ᵗ","u":"ᵘ","v":"ᵛ","w":"ʷ","x":"ˣ","y":"ʸ","z":"ᶻ","A":"ᴬ","B":"ᴮ","C":"ᶜ","D":"ᴰ","E":"ᴱ","F":"ᶠ","G":"ᴳ","H":"ᴴ","I":"ᴵ","J":"ᴶ","K":"ᴷ","L":"ᴸ","M":"ᴹ","N":"ᴺ","O":"ᴼ","P":"ᴾ","Q":"ᑫ","R":"ᴿ","S":"ˢ","T":"ᵀ","U":"ᵁ","V":"ⱽ","W":"ᵂ","X":"ˣ","Y":"ʸ","Z":"ᶻ","`":"`","~":"~","!":"﹗","@":"@","#":"#","$":"﹩","%":"﹪","^":"^","&":"﹠","*":"﹡","(":"⁽",")":"⁾","_":"⁻","-":"⁻","=":"⁼","+":"+","{":"{","[":"[","}":"}","]":"]",":":"﹕",";":"﹔","?":"﹖"}; | |
let doTinyCaption = ( (_d, _q, _t) => { // Inject Tiny type | |
let aTinyCnt = [..._d.querySelectorAll( _q )]; | |
if( aTinyCnt ){ setTimeout( ()=>{ doTinyCaption.tick(); }, 32); } | |
return { | |
"tick": ()=>{ | |
let sMU = ""; | |
aTinyCnt.forEach( (eVivCnt) => { | |
if(eVivCnt.atTiny !== eVivCnt.dataset.atTiny){ // Data atr changed | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# by: Cody Kochmann | |
# created: 2021-05-10 | |
# license: MIT | |
import sqlite3, json, random, string, sys, functools | |
''' This script demonstrates basic querying of json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isObject(entity) { | |
return typeof entity === "object" && entity !== null; | |
} | |
function getAdjacentNodes(obj) { | |
return ( | |
Object.entries(obj) | |
.filter(([, v]) => isObject(v)) | |
) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# Start/Stop Qlik services in correct order: | |
1. Qlik Sense Repository Database (QRD) | |
2. Qlik Sense logging service | |
3. Qlik Sense Service Dispatcher (QSD) | |
4. Qlik Sense Repository Service (QRS) | |
...and in no particular order... | |
5. Qlik Sense Proxy Service (QPS) | |
6. Qlik Sense Engine Service (QES) | |
7. Qlik Sense Scheduler Service (QSS) | |
8. Qlik Sense Printing Service (QPR) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Desc: Produce CSV with client-side JS. Contruct Blob and Download as CSV file | |
let nativeCSV = ( ( _d )=>{ | |
let oCnt, jnCSV, sCSV, blCSV, elCSV; // config, json, array, blob, and element | |
let retObj = { | |
"init": ( _oCnt )=>{ | |
oCnt = _oCnt; | |
if( oCnt.fileName.indexOf("####") !== -1) { | |
oCnt.fileName = oCnt.fileName.replace("####", Date.now() );} | |
jnCSV = sCSV = blCSV = elCSV = ""; | |
return retObj; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Example using caching */ | |
import { ExpirationPlugin } from 'workbox-expiration'; | |
import { precacheAndRoute } from 'workbox-precaching'; | |
import { registerRoute } from 'workbox-routing'; | |
import { StaleWhileRevalidate } from 'workbox-strategies'; | |
// Inject workbox in Service Worker | |
precacheAndRoute(self.__WB_MANIFEST); | |
// Enable navigation preload (work in Chrome) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Scott C. Krause 👁️ neodigm | 2021 | |
// Wait for Vue.js to mount and make VUEX auth token available to the chrome extension. | |
var _d = document, eScr = _d.createElement("script"); | |
eScr.innerHTML = ` | |
setInterval(() => { | |
var _d = document; | |
if( !_d.querySelector("[data-ext-auth]")){ | |
var eV = _d.querySelector( 'DIV#app' ); | |
if( eV?.__vue__?.$store?.state?.auth?.token ){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var doRemoveSS = ( (_d, _q)=>{ | |
let aS = [ ... _d.styleSheets]; | |
aS.forEach( (oS)=>{ | |
if( !oS.href ){ | |
let aCSSR = [ ... oS.cssRules]; | |
aCSSR.forEach( (oR)=>{ | |
if( typeof oR.selectorText != "undefined"){ | |
if( oR.selectorText.indexOf( _q ) != -1){ | |
console.log( oR.selectorText ); | |
oS.disabled = true; |
NewerOlder