Skip to content

Instantly share code, notes, and snippets.

View luispinto23's full-sized avatar

Luís Pinto luispinto23

View GitHub Profile
@luispinto23
luispinto23 / eslint-config.md
Last active April 29, 2022 14:17
ESLint config

VS Code

Install the ESLint extension.

Configure ESLint as the default formatter

Enter the command pallete Ctrl+Shift+P

  • type: Preferences: Open User Settings image

    • Open the JSON config file:
@luispinto23
luispinto23 / fetch-paginated-api.js
Last active May 21, 2020 15:57
fetch paginated API
const apiUrl = `https://exampleAPI.example`;
const reqParams = {
params: {
someParam: "ACME",
page: 1,
pageSize: 180
}
}
@luispinto23
luispinto23 / cloudSettings
Last active February 7, 2020 18:51
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-02-07T18:50:57.422Z","extensionVersion":"v3.4.3"}
@luispinto23
luispinto23 / usort.php
Created November 24, 2014 12:07
PHP array sort by key
usort($arrayFoo, function($a, $b) {
return $a['ordemBar'] - $b['ordemBar'];
});