Skip to content

Instantly share code, notes, and snippets.

View MichaelDimmitt's full-sized avatar
:shipit:
𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫

MichaelDimmitt

:shipit:
𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫
View GitHub Profile
@MichaelDimmitt
MichaelDimmitt / cold-terms-warm-terms-javascript-and-react.md
Last active March 20, 2024 16:21
hot terms javascript and react

This document is
an effort to get people up to speed where they feel confident about react and javascript

I am putting together an organized list of what I grab for when solving various problems.
"what I know cold", and these are just the things that currently come to mind it can be updated later.

There are also "warm items", that I know to google and reach for when encountering a situation
an example of that would be an IIFE - immediately invoked function expression.

Fundamentals, Javascript Logic.

@MichaelDimmitt
MichaelDimmitt / cors.md
Created January 10, 2024 20:17 — forked from jesperorb/cors.md
Handle CORS Client-side

Handle CORS Client-side

Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources (e.g. fonts) on a web page to be requested from another domain outside the domain from which the first resource was served. This is set on the server-side and there is nothing you can do from the client-side to change that setting, that is up to the server/API. There are some ways to get around it tho.

Sources : MDN - HTTP Access Control | Wiki - CORS

CORS is set server-side by supplying each request with additional headers which allow requests to be requested outside of the own domain, for example to your localhost. This is primarily set by the header:

Access-Control-Allow-Origin
@MichaelDimmitt
MichaelDimmitt / score-cards.md
Created December 12, 2023 18:27
report cards from "fundamentals of software architecture"
@MichaelDimmitt
MichaelDimmitt / remarkable-ssh-troubleshooting.md
Last active November 17, 2023 00:07
Finding my epub book and notes by ssh-ing into my remarkable2 device.

My epub book and notes dissappeared!

This gist documents my journey:

To find my epub book and notes by ssh into my remarkable2 device.

@MichaelDimmitt
MichaelDimmitt / open_command.bash
Last active November 15, 2023 17:09
open_command.sh
__find_open_command_from_Operating_System() {
local open_cmd
OSTYPE="$(uname -s | tr 'A-Z' 'a-z')"
case "$OSTYPE" in
darwin*) open_cmd='open' ;;
cygwin*) open_cmd='cygstart' ;;
linux*) [[ "$(uname -r)" != *icrosoft* ]] && open_cmd='nohup xdg-open' || {
open_cmd='cmd.exe /c start ""'
} ;;
@MichaelDimmitt
MichaelDimmitt / open_routes.bash
Last active November 15, 2023 17:10
Quickly open all rails get routes ... for manual testing
#!/bin/bash
# This code allows for pagination, 4 comments below say: "remove me to turn off pagination"
{
paginationCursor=1; # remove me to turn off pagination
paginationScalar=5; # remove me to turn off pagination
baseURL="https://localhost";
listOfRoutes=$(
rails routes |
grep GET |
# Basic usage: Tell iex to write all history to
# rlwrap -a iex # --always-readline
# Full working script:
# Increment the file name with the session pattern. based on what files currently exist:
rlwrapVersion=$(ls $HOME/.$filePrefix* | wc -l | awk '{print 0$1 + 1}');
# This is the path we will be writing to:
rlwrapTempPath="$HOME"/."$filePrefix"_"$rlwrapVersion"_history;
@MichaelDimmitt
MichaelDimmitt / elixir-traverse-maps-and-lists-and-history.md
Last active November 17, 2023 00:59
elixir, traversing maps and lists. Also look at iex history.

3 contraversial things that I believe

  1. Programs/applications can be completed and stand on their own: (Accomplish a feature set that a customer finds value in and do not allow scope creep outside of that feature set. This is crucial to be able to build software without handcuffing yourself with legacy code. If your career was an endless list of technical debt it would only ever increase and you would constantly be disappointing by dropping support throughout your career. This does happen but we should design our software especially open source software so that it can stand on its own.)

  2. Tasks can be impossible (You can have a dependency that says you cant have that thing and does not give you access)

  3. Something can be explored completely: (Something can be deemed logically complete by exploring all options available, or proving that the task is not solvable. I watched a video once that mentioned humans are unique in being able to prove things are not solvable instead of solving them which is often d