Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am denefi on github.
  • I am denefi (https://keybase.io/denefi) on keybase.
  • I have a public key ASApiainy92_Pr9Q58AactXLikXTmK_Hr-fb1rCUrJj7swo

To claim this, I am signing this object:

@denefi
denefi / m2-mongoose-cheatsheet.md
Last active March 16, 2023 15:02 — forked from luisjunco/m2-mongoose-cheatsheet.md
Mongoose methods cheat sheet

Mongoose static methods:

Create

  • Model.create(data)
  • Model.insertMany(arr)

Read

  • Model.find()
@denefi
denefi / m2-express-cheatsheet-GET-POST.md
Created March 17, 2023 15:20 — forked from luisjunco/m2-express-cheatsheet-GET-POST.md
Express Cheatsheet: GET (route params & query string) + POST (request body)

Intro

Here's some ways of passing information from a client to a server:

  • In the URL:

    • Route Params (ex. https://localhost:3000/artists/madonna)
    • Query String (ex. https://localhost:3000/search?maxPrice=200)
  • In the BODY of the http request:

  • With some http request methods (for example, POST and PUT), it is possible to send additional data in what is called the "request body".

@denefi
denefi / m3-react-controlled-compon.md
Created April 5, 2023 11:04 — forked from luisjunco/m3-react-forms.md
React Controlled Components - Cheatsheet

React Controlled Components

Intro (what are controlled components & why we use them)

  • Form elements such as <input>, <textarea>, and <select> naturally keep some internal state (and change based on user's input). For example, this
  • In React, mutable state is typically kept in the state of components. And when that state needs to change, we go through React (ie. we tell React to update state)

React Router Cheatsheet

  • This cheatsheet is based on React Router Dom v6.7.0
  • If you use a different version, some things may be different




Initial Setup

@denefi
denefi / .prettierrc
Created April 12, 2023 12:44
Prettier config for ironhack project
{
"trailingComma": "es5",
"tabWidth": 2,
"singleQuote": false
}
@denefi
denefi / freeotp_backup.md
Created October 21, 2023 09:57 — forked from kontez/freeotp_backup.md
A guide to back up and recover 2FA tokens from FreeOTP (Android)

Backing up and recovering 2FA tokens from FreeOTP

Backing up FreeOTP

Using adb, create a backup of the app using the following command:

adb backup -f freeotp-backup.ab -apk org.fedorahosted.freeotp