Skip to content

Instantly share code, notes, and snippets.

View SupaFuzz's full-sized avatar
🪐
Working from home

Amy Hicox SupaFuzz

🪐
Working from home
View GitHub Profile
@SupaFuzz
SupaFuzz / atrium_from_workflow.md
Created October 5, 2022 19:37
how to execute atrium integrator jobs from BMC ARSystem Workflow

Execute Atrium Integrator Jobs from ARSystem Workflow

you can create transformations in Atrium Integrator that can cleanly execute logic far beyond the capabililties of the most convoluted ARS "patch".

What's more you can then call these AI transformations (think "subroutines") from within ARS workflow!

Here's how. but first some notes

@SupaFuzz
SupaFuzz / promises_and_catch_first.md
Created August 18, 2022 20:11
Promises and Promise.all() and catch() before then()

Promises Don't Work Like You Might Think

The order of .catch() and .then() is crucial

new Promise(function(resolve, reject){
  setTimeout(function(){ reject('an error happened!'); }, 1500);
}).catch(function(error){
  console.log(`error: ${error}`);
}).then(function(result){
@SupaFuzz
SupaFuzz / foroce_csv_column_string_format.md
Last active April 12, 2022 16:17
force CSV column to string format

so you need a way to force a CSV column to be interpreted as a string.

Here's how you do that

take this row for instance:

column_1, column_2, 2346098560495680345968, column_3

open that in excel and you're going to get conversion to sceintific

@SupaFuzz
SupaFuzz / how-to-simulate-bad-network.md
Last active July 4, 2022 19:00
simulate bad network on linux

how to simulate slow / messed up network

You might need to simulate crappy wifi, or spotty cell or otherwise "there but just barely or not really" network connectivity, so as to make sure your app or whatevz handles that gracefully.

Presuming your server is on linux, this is the long and short of it:

# add a rule limiting bandwidth and adding latency
# to the network interface serving your thing
# mine is 'enp2s0', but maybe yours is 'eth0'
@SupaFuzz
SupaFuzz / indexedDB_vanilla_gist.html
Last active December 5, 2019 21:29
IndexedDB vanilla basic CRUD operations
<!DOCTYPE html>
<html lang="en">
<!--
This illustrates the basic tricks you need to get your CRUD-on with
indexedDB. There is a helluva lot more to it but if you basically
are at the point I am, and it's all like "I need a version of
localStorage that can hold a couple hundred MBs" ... these'll be the
code nuggets you need to get that done.