Skip to content

Instantly share code, notes, and snippets.

View GitPaulo's full-sized avatar
🐈‍⬛
Pair programming with my cat :3

Paulo Santos GitPaulo

🐈‍⬛
Pair programming with my cat :3
View GitHub Profile
@GitPaulo
GitPaulo / vfsForms.js
Last active March 15, 2025 01:57
VFS Global: Fast form filling script
/*
VFS Global From Filler
1. Fill in the config
2. Paste full filled-in code in console
3. Use the UI to fill in parts of the form (remember to click away from popups)
*/
const config = {
login: {
email: "",
@GitPaulo
GitPaulo / scrapglobalddranks.js
Created May 4, 2024 15:26
Scrapes the global ffxiv rankings based on the website xiv.johnrivs.com/deepdungeon
// Use in console: https://xiv.johnrivs.com/deepdungeon
const scrapeDataFromPage = (pageNumber) => {
return new Promise((resolve, reject) => {
fetch(`https://xiv.johnrivs.com/deepdungeon?page=${pageNumber}`)
.then(response => response.text())
.then(html => {
const parser = new DOMParser();
const doc = parser.parseFromString(html, 'text/html');
const baseXPath = '/html/body/div/div[6]/div/div[';

🐧 Just have a look through my repos. I have nothing to pin.

@GitPaulo
GitPaulo / .ideavimrc
Last active December 11, 2024 19:07
Vim Emulation Configurations
" --- Plugins ---
" https://github.com/JetBrains/ideavim/wiki/IdeaVim-Plugins
Plug 'tpope/vim-surround' " Surround: cs[prev_chars][new_chars], ds[chars], ysiw[char]
Plug 'tpope/vim-commentary' " Commentary: gc{motion}, gcc for line comments
Plug 'vim-scripts/ReplaceWithRegister' " Replace with register: [count][x]gr{motion}
Plug 'easymotion/vim-easymotion' " Install IdeaVim-EasyMotion and AceJump plugins.
Plug 'machakann/vim-highlightedyank' " Highlighted yank
Plug 'preservim/nerdtree' " NERDTree
Plug 'terryma/vim-multiple-cursors' " Multiple Cursors

Angular BPs

A personal opinionated compilation of the most useful practices to be aware of when developing angular apps.

Use of 'Trackby'

On each ngDoCheck triggered for the ngForOf directive, Angular checks what objects have changed. It uses differs for this process and each differ uses trackBy function to compare the current object with the new one. The default trackBy function tracks items by identity:

(index: number, item: any) => item;

If the value changes, the differ reports a change. As we've seen, the default function returns object references, it will not match the current item if the object reference has changed! By customizing the trackBy function, such that it will return something else, for example, some key value of the object, will prevent angular from re-rendering the whole DOM tree by not reporting uneccesary changes. Example:

@GitPaulo
GitPaulo / COMP526 - Quick Data Access.md
Last active May 19, 2020 09:51
COMP526 - Quick Data Access

COMP526 - Quick Data Access

Hyperlink Key

  • [W] = Course Webpage
  • [Vi] = ith Video
  • [N] = set of lecture notes
  • [T] = set of tutorials with solutions
  • [Ei] = ith item of external information

Unit 3 (Old Stuff & Parallel Computing Model) [W] [N] [T]

/*******************************************************************
* My solutions for the classic 'FizzBuzz' problem + a bit of humor *
* As time goes by I just keep updating this file... *
* Hopefully one day i'll look back thinking 'why?'- 'its fun!' *
********************************************************************/
// The 'Hello world!' boy
console.log("1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz 11 Fizz 13 14 FizzBuzz 16 17 Fizz 19 Buzz Fizz 22 23 Fizz Buzz 26 Fizz 28 29 FizzBuzz 31 32 Fizz 34 Buzz Fizz 37 38 Fizz Buzz 41 Fizz 43 44 FizzBuzz 46 47 Fizz 49 Buzz Fizz 52 53 Fizz Buzz 56 Fizz 58 59 FizzBuzz 61 62 Fizz 64 Buzz Fizz 67 68 Fizz Buzz 71 Fizz 73 74 FizzBuzz 76 77 Fizz 79 Buzz Fizz 82 83 Fizz Buzz 86 Fizz 88 89 FizzBuzz 91 92 Fizz 94 Buzz Fizz 97 98 Fizz Buzz");
// The good boy