Skip to content

Instantly share code, notes, and snippets.

@tresorama
tresorama / README.md
Last active October 27, 2022 18:17
Git_examples

Git common patterns

Check if i need to pull

Assumed 'origin' as name of remote repo.

Assumed 'master' as name of local branch.

Assumed 'master' as name of remote branch.

@tresorama
tresorama / .prettierrc.js
Last active October 27, 2022 18:16
Prettier Configration
module.exports = {
printWidth: 120, // default 80
// tabWidth: 2, // default 2
// useTabs: false, // default false
// semi: true, // defaul true
// singleQuote: false, // default false
quoteProps: "consistent", // default 'as-needed' "<as-needed|consistent|preserve>"
// jsxSingleQuote: false, // default false
// trailingComma: "es5", // default 'es5' "<es5|none|all>"
// bracketSpacing: true, // default true
@tresorama
tresorama / README.md
Last active October 27, 2022 18:11
JS One-Liners

JS One Liners

Overview

This Gist contains one liners found and built.


Need more ? Check the following list...

@tresorama
tresorama / README.md
Last active October 27, 2022 18:11
Python Notes

Python Notes

Educational notes.

@tresorama
tresorama / README.md
Last active December 14, 2022 15:29
Typescript Common Tricks

Typescript Common Tricks

@tresorama
tresorama / README.md
Last active December 19, 2022 13:13
JS Pattern for common problems

JS Pattern for common problems

@tresorama
tresorama / README.md
Created November 15, 2022 16:28
Upload file to AWS S3

Upload file to AWS S3 with Node.js and @aws-sdk v3

Install sdk

npm install @aws-sdk/client-s3

Code

@tresorama
tresorama / README.md
Last active November 15, 2022 16:50
Upload image to ImgBB

Upload Image to ImgBB with Node

Instal packages

npm i axios form-data
@tresorama
tresorama / README.md
Last active November 16, 2022 17:00
Convert CSV to JSON / TS in Node

Convert CSV to JSON / TS in Node

Install packages

npm i csv-parse@5
@tresorama
tresorama / README.md
Last active November 16, 2022 23:47
Use scroll restoration with Next js

Use scroll restoration with Next.js

Tested with

  • Next 12.3.1
  • NOT ENABLED => { experimental : { scrollRestoration: true }