Skip to content

Instantly share code, notes, and snippets.

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

MichaelDimmitt

:shipit:
𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫
View GitHub Profile
@MichaelDimmitt
MichaelDimmitt / DeployToSurge.md
Created May 31, 2021 14:55
Deploy surge with cors enabled and https

Deploy surge with cors enabled and https

npm install -g surge
yarn build;
cp build/index.html build/200.html;
echo '*' > build/CORS;
surge build appname.surge.sh
@MichaelDimmitt
MichaelDimmitt / gist:959016f53ce93e6fe0d095313a973140
Last active August 26, 2021 10:10
How to handle database does not exist.
brew install postgresql;
brew services start postgresql;

psql: error: FATAL: database "michaeldimmitt" does not exist

psql postgres;
postgres=# CREATE DATABASE michaeldimmitt with OWNER michaeldimmitt;
@MichaelDimmitt
MichaelDimmitt / my-quick-no-mouse-keyboard-shortcuts.md
Last active February 7, 2025 13:13
macbook keyboard navigation with no mouse - personal cheat sheet

Mac Computer

system commands

  • navigation
    hold fn hold control f2 - navigate to toolbar menu
    fn - mission control

  • text cursor - emacs stamdard
    ctrl a - go to beginning
    ctrl e - go to end

@MichaelDimmitt
MichaelDimmitt / BashResourceSuggestions.md
Last active November 1, 2021 04:15
bash suggested resources.

This will be an ongoing list for personal reference.

IsaacG - from exercism https://exercism.org/tracks/bash/exercises/hamming/solutions/IsaacG

The && and || in bash are short-circuit logical operators. They quit evaluating as soon as possible.

a && b will only run b if a is true. a || b will only run b if a is false. a || b || c will stop as soon as anything is true. a && b || c will run a and ... b or c or both!! This is why a full blown if-else is often a good idea.

( is a subprocess. The exit status of the subprocess does propagate to the parent shell. If you got set -e (not recommended), you'd get its exit status. But a subshell cannot exit the parent shell.

@MichaelDimmitt
MichaelDimmitt / pianobar-usage.md
Last active December 7, 2022 16:11
Keep track of time and listen to music!

Keep track of time and listen to music! πŸŽ‰

I want to listen to my music from command line,
but I have a meeting in 20 minutes!

timeout 20m pianobar || reset

^ use this one

With the timeout command you can specify: minutes, hours, days, seconds

@MichaelDimmitt
MichaelDimmitt / react-recommendations-for-new-users.md
Last active December 21, 2023 19:51
react recommendations for new users

Do you have any good react start up guides you recommend?

My take,

The documentation on hooks is very helpful

  • the fact that it is not the default when you go through the react docs is kind of frustrating.

https://reactjs.org/docs/hooks-intro.html

^ I would read through 1-8

import { act, render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import React from 'react';
import MyComponent from './MyComponent';
const weirdResponseResultStructure = {
results: [ // www.example.com/nameOfUrl
{
id: 'KS',
text: 'KS',
@MichaelDimmitt
MichaelDimmitt / because-meetup-breaks.md
Last active December 7, 2022 14:34
getting started , meetup graph ql

Meetup api shut down rest

and the graph ql docs are not good

https://www.meetup.com/api/guide/#graphQl-guide

The out of the box example does not work.
However, this version is works:

query='query { self { id name } }'
YOUR_TOKEN='put-a-token'
curl -X POST https://api.meetup.com/gql \
@MichaelDimmitt
MichaelDimmitt / conversation-angular.md
Created February 14, 2022 15:51
conversation starter for people learning angular

angular 2+ there are a few things to learn

the generate command can give examples of a few of these https://angular.io/cli/generate

component
directive
service https://angular.io/guide/architecture-services
pipe
@MichaelDimmitt
MichaelDimmitt / scss-intro.md
Last active December 21, 2023 19:47
scss intro

Info

less is always more with css

Things to consider with scss

Tips:

  1. look at the browser styles
  2. try to have less scss files
  3. try to have less scss code

Common mistakes I find in scss projects