- Optimize for code that is easy to understand on the first read.
- Prefer simple, direct implementations with minimal layers.
- Use clear names before adding comments.
- Add short comments above non-obvious blocks. Explain why the code exists or a design decision was made; do not narrate ordinary syntax.
- Keep comments concise, local, and written in simple language.
- Avoid speculative support, excessive defensive code, legacy behavior that cannot occur, and overengineering.
- Do not introduce unrelated behavior changes in a focused PR.
- Prefer root-cause fixes. Do not use hacks or linter suppressions when clear code can solve the issue.
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
| // This file was generated by the storyblok CLI. | |
| // DO NOT MODIFY THIS FILE BY HAND. | |
| import type { ISbStoryData } from '@storyblok/js'; | |
| import type { StoryblokAsset, StoryblokRichtext, StoryblokMultilink, StoryblokMultiasset } from '../storyblok.d.ts'; | |
| export interface About { | |
| title: StoryblokRichtext; | |
| richText?: StoryblokRichtext; | |
| teamTitle: string; | |
| teamEntries: TeamEntry[]; | |
| runes: StoryblokMultiasset; |
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 React from 'react' | |
| const Component = () => <Popup text="You Win" items={[]} /> | |
| const Component2 = () => ( | |
| <GenericPopup> | |
| {/* <WinComponent items={[]} /> */} | |
| <LoseComponent items={[]} /> | |
| </GenericPopup> | |
| ) |
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
| { | |
| "success": true, | |
| "object": "courier_pricing", | |
| "message": "Success to retrieve courier pricing", | |
| "code": 20001007, | |
| "origin": { | |
| "location_id": null, | |
| "latitude": -6.3031123, | |
| "longitude": 106.7794934999, | |
| "postal_code": 12440, |
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
| backend: | |
| depends_on: | |
| - db | |
| ports: | |
| - '8888:8888' | |
| volumes: | |
| - ./backend/app:/app | |
| environment: | |
| - JUPYTER=jupyter lab --ip=0.0.0.0 --allow-root --NotebookApp.custom_display_url=http://127.0.0.1:8888 | |
| - SERVER_HOST=http://${DOMAIN?Variable not set} |
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
| Checking for script in /app/prestart.sh | |
| Running script /app/prestart.sh | |
| INFO:__main__:Initializing service | |
| INFO:__main__:Starting call to '__main__.init', this is the 1st time calling it. | |
| INFO:__main__:Service finished initializing | |
| DB: postgresql+psycopg2://postgres:***@db_airflow:5432/fairphonic_airflow | |
| [2020-09-10 11:15:20,285] {db.py:378} INFO - Creating tables | |
| INFO [alembic.runtime.migration] Context impl PostgresqlImpl. | |
| INFO [alembic.runtime.migration] Will assume transactional DDL. | |
| 2020-09-10 11:15:22.064610: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory |
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
| <!-- remove GlobalStyle from this file --> |
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 fm from 'front-matter' | |
| import path from 'path' | |
| export function markdown() { | |
| return { | |
| name: 'rollup-plugin-markdown', | |
| transform(code, id) { | |
| // Check the file extension | |
| const extension = path.extname(id) |
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 { GraphQLClient } from 'graphql-request' | |
| export const graphqlClient = new GraphQLClient('YOUR_GRAPHQL_ENDPOINT', { | |
| headers: { | |
| authorization: `Bearer SOMETHING_SOMETHING`, // if auth is needed | |
| }, | |
| }) |
NewerOlder