- Infer the user's intent and task scope from instructions and prior conversation context.
- Choose the simplest implementation that fully solves the problem. Do not reimplement common functionality when a suitable library exists.
- Prefer deleting code over adding code. The best code is code that does not need to exist.
- Use established, maintained libraries when they reduce complexity or improve reliability.
- Write self-explanatory code. Add comments only when the code cannot express the necessary context.
- Before assuming a library lacks a capability, check its documentation, types, and source.
- Build features end to end in small increments. Do not design for hypothetical future requirements.
- Preserve backward compatibility only when required. Otherwise remove obsolete code instead of adding compatibility layers.
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
| /* | |
| 1. Use a more-intuitive box-sizing model. | |
| */ | |
| *, *::before, *::after { | |
| box-sizing: border-box; | |
| } | |
| /* | |
| 2. Remove default margin | |
| */ | |
| * { |
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
| ### A Pluto.jl notebook ### | |
| # v0.16.1 | |
| using Markdown | |
| using InteractiveUtils | |
| # This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error). | |
| macro bind(def, element) | |
| quote | |
| local el = $(esc(element)) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| { | |
| "version": 4, | |
| "configurations": [ | |
| { | |
| "name": "Arduino", | |
| "compilerPath": "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++", | |
| "compilerArgs": [ | |
| "-std=gnu++11", | |
| "-fpermissive", | |
| "-fno-exceptions", |
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
| curl -X POST -H "Content-Type: application/json" \ | |
| -H "Authorization: $token" YOUR_URL \ | |
| -d "{\"commandType:\": \"command\", \"command\": \"turnOff\" }" |
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
| *, | |
| *::before, | |
| *::after { | |
| box-sizing: border-box; | |
| } | |
| html { | |
| font-family: sans-serif; | |
| line-height: 1.15; | |
| -webkit-text-size-adjust: 100%; |
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
| Server arm = new Serverbuilder(); | |
| ... | |
| .service("/health", new ManagedHttpHealthCheckService()) | |
| .serverListner( | |
| ConsulUpdatingListner.builder(config.getServerName(), config.getPort()) | |
| .address(config.getServerAddress()) | |
| .check(String.format("http://localhost:%d/health/", config.getPort()), 10, 5, 15) | |
| .tag() | |
| .build() |
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
| #!/bin/sh | |
| IFS=$'\n' | |
| for INFILE in $(ls -1 MY_FILE) | |
| do | |
| baseFilename=`basename "${INFILE}" .aiff` | |
| outfile="${baseFilename}.mp3" |
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 countries = { | |
| hongkong: '๐ญ๐ฐ', | |
| 'mainland china': '๐จ๐ณ', | |
| japan: '๐ฏ๐ต', | |
| korea: '๐ฐ๐ท', | |
| india: '๐ฎ๐ณ', | |
| malaysia: '๐ฒ๐พ', | |
| indonesia: '๐ฎ๐ฉ', | |
| philippines: '๐ต๐ญ', | |
| canada: '๐จ๐ฆ', |
NewerOlder