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
| // https://code.claude.com/docs/en/settings | |
| { | |
| "$schema": "https://json.schemastore.org/claude-code-settings.json", | |
| "permissions": { | |
| "allow": [ | |
| "Bash(npm run lint)", | |
| "Bash(npm run test *)", | |
| "Read(~/.zshrc)" | |
| ], | |
| "deny": [ |
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
| // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes | |
| // https://www.typescriptlang.org/docs/handbook/2/classes.html | |
| class Foo { | |
| #privateFieldWithInitializer = 42; | |
| constructor(...args) { | |
| super(...args) | |
| this.code = "42" | |
| } |
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
| https://testing-library.com/docs/react-testing-library/migrate-from-enzyme | |
| // getByRole, queryByRole, getAllByRole, queryAllByRole, findByRole, findAllByRole | |
| // getByLabelText, queryByLabelText, getAllByLabelText, queryAllByLabelText, findByLabelText, findAllByLabelText | |
| // getByPlaceholderText, queryByPlaceholderText, getAllByPlaceholderText, queryAllByPlaceholderText, findByPlaceholderText, findAllByPlaceholderText | |
| // getByText, queryByText, getAllByText, queryAllByText, findByText, findAllByText | |
| // getByDisplayValue, queryByDisplayValue, getAllByDisplayValue, queryAllByDisplayValue, findByDisplayValue, findAllByDisplayValue | |
| // getByAltText, queryByAltText, getAllByAltText, queryAllByAltText, findByAltText, findAllByAltText |
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
| ## https://developers.google.com/edu/python | |
| # ternary | |
| a if x else b | |
| ## strings | |
| ## https://developers.google.com/edu/python/strings | |
| s = 'hi' | |
| print(s[1]) ## i | |
| print(len(s)) ## 2 |
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
| // https://isocpp.org/images/uploads/2-Tour-Basics.pdf | |
| std::cout << __func__ << __FILE__ << __LINE__ << std::endl; | |
| // XXX scalar vs aggregate | |
| const auto foo { 42 }; // valid but {} hints at aggregate (in theory) | |
| const auto foo = 42; | |
| const auto str { "foo" }; | |
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
| // all libs | |
| // https://en.cppreference.com/w/cpp/header | |
| //////////// | |
| #include <iostream> | |
| std::cout << "Hello, world!" << std::endl; | |
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
| ## starters | |
| x = [ 1, 2, 3, 4, 5 , 6, 7 ] | |
| print(f'{x} => {xyz(x)}')' | |
| x = [ 1, 2, 3, 4, 5 , 6, 7 ] | |
| print(f'{x} => {xyz(x, len(x))}') | |
| x, y = 'foo', 2 | |
| print(f'{x},{y} => {xxxxx(x, y)}') |
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
| // Match objet partiel: | |
| expect(xyz).toMatchObject({ | |
| action: 'generated', | |
| attributes: { | |
| duration: expect.any(Number), | |
| }, | |
| }); |
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
| import { expect } from 'chai' | |
| import { | |
| LIB | |
| } from '../index.js' | |
| describe(`${LIB}`, function () { | |
| describe('plugins', function () { |
NewerOlder