- Google Chrome
- Avast Free if necessary
- Vscode
- Enable Sync
- Install font
- Iterm 2
- oh-my-zsh
- PowerLevel 10k
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const wrap = document.querySelector("body > div.aa_toc_wrap > div.aa_toc"); | |
const HEIGHT = 560; | |
Object.assign(wrap.style, { | |
height: `${HEIGHT}px`, | |
maxHeight: `${HEIGHT}px`, | |
display: "block", | |
overflowY: "scroll", | |
padding: "0 20px", | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sleep(ms) { | |
return new Promise((resolve) => setTimeout(resolve, ms)); | |
} | |
const get_emails = Array.from( | |
document.querySelectorAll("[id^='account-name_']") | |
).map((item) => item.innerText); | |
const process_buttons = (emails) => { | |
const email = emails.pop(); | |
document |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { loadOptions } = require("mocha/lib/cli/options"); | |
const options = loadOptions(process.argv.slice(2)); | |
let spec = "tests/**/*.js"; | |
if (options._.length) { | |
spec = options._; | |
} | |
const common_config = { | |
require: ["./ts-node", "config/init-config.js", "tests/test-globals.js"], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Without Mapper | |
const UserName = ({name}) => ( | |
<p>{name}</p> | |
) | |
const UserBio = ({firstName, lastName, birthDate}) => ( //... | |
<p>{firstName} {lastName} - {birthDate}</p> | |
) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Your API Response or another data source | |
const API_RESPONSE = { | |
userName: "Talysson", | |
userLastName: "Cassiano", | |
birth: "01/04/1992", | |
evaluation: { | |
average: 4.5, | |
total: 20, | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Not the best way to write components and tests, having different names for same data | |
const UserProfile = ({ name, lastName, birthDate, userEvaluation }) => { | |
const fullName = `${name} ${lastName}` | |
... | |
} | |
describe('UserProfile', () => { | |
it('renders with correct props', () => { | |
const MOCK_USER = { | |
name: 'Abner', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
constructor() { | |
this.openModal = this.openModal.bind(this); | |
this.closeModal = this.closeModal.bind(this); | |
} | |
openModal(modal) { | |
this.setState({ | |
[modal]: true, | |
}); | |
} |
NewerOlder