Skip to content

Instantly share code, notes, and snippets.

View trozdol's full-sized avatar
💭
All the good repos are private

Shayne Trosdahl trozdol

💭
All the good repos are private
View GitHub Profile
@trozdol
trozdol / README.md
Created December 11, 2023 08:37
Misc Markdown Images
<p align="center">
    <img src="https://placehold.co/300x200" />
</p>

function mergeArrayObjects(target = [], updates = [], where = []) {
return [...target, ...updates].reduce((result, curr) => {
const existingIndex = result.findIndex((el) => {
return where.every((prop) => el[prop] === curr[prop]);
});
if (existingIndex > -1) {
result[existingIndex] = { ...result[existingIndex], ...curr };
} else {
result.push(curr);
}
/**
* Example of a workflow that takes an initial value and
* passes it through a series of functions. Each function'
* output is the input of the next function. The final
* output of the workflow is the output of the last function.
*/
const exampleWorkflowFailure = createWorkflow(addOne, double, wait, square)
exampleWorkflowFailure(5)
@trozdol
trozdol / Mac App Installer.sh
Created January 18, 2023 22:54
A Script to bulk install applications using Homebrew and the App Store.
# !/bin/bash
VERSION=0.0.1
NONINTERACTIVE=1 # for homebrew install
DRY_RUN=false
ENABLED_DEFAULT=true
TAPS_ENABLED=$ENABLED_DEFAULT
TAPS_ENABLED_ASK=true
/**
* A class to create a enum style object class to hold static values.
* The constructor will accept an anonymous class, object, array or
* multiple strings as enum constants.
*
* @example
* const Size1 = new Enum(class {
* SM;
* MD;
Ext.define('Ext.ux.DynamicHeightTabPanel', {
extend: 'Ext.tab.Panel',
alias: 'widget.dynamic-height-tabpanel',
initConfig() {
this.callParent(arguments);
this.on({
painted: {
fn: 'updateInitialCardHeight',
const { readdirSync, statSync } = require('fs');
const { resolve, parse } = require('path');
async function tree(path = '.', opts = {}) {
path = resolve(path);
opts = Object.assign({ toArray: false, depth: 1, maxDepth: 5 }, opts);
const list = opts.toArray ? [] : new Map();
const currentDepth = opts.depth;
SELECT
NAME,
COLTYPE,
LENGTH,
TBNAME
FROM SYSIBM.SYSCOLUMNS
WHERE NAME = 'CTL_NO';
-- SEARCH FOR
-- params: I hate everything about this.
-- 1,2,3) SORT BY : CONTAINER_TYPE
-- 4) OBJECT_TYPE : ITEM_HAZMAT
-- 5) COLUMN TO SEARCH : ITEM_NO
-- 6) VALUE TO SEARCH FOR : 00876773
SELECT
OBJECT_TYPE,
OBJECT_ID_VALUE,
KEY,
@trozdol
trozdol / CellEditing.js
Created November 18, 2020 22:27
Bug Fix Ext.grid.plugin.CellEditing class when tabbing through grid cells and not all cells are editable.
Ext.define('Ext.grid.plugin.CellEditing', {
override: 'Ext.grid.plugin.CellEditing',
activateCell: function(location) {
var me = this,
activeEditor = me.activeEditor,
previousEditor = me.$previousEditor,
editor, selModel, result;
if (!location) {