Skip to content

Instantly share code, notes, and snippets.

View ElianCodes's full-sized avatar
Probably drinking coffee

Elian ElianCodes

Probably drinking coffee
View GitHub Profile
@bramus
bramus / astro-env-vars.md
Created October 17, 2021 09:13
Astro Env Vars
  • Install @snowpack/plugin-dotenv

    npm i --save @snowpack/plugin-dotenv
    
  • Configure Astro via astro.config.mjs to use @snowpack/plugin-dotenv

plugins: [

@wojteklu
wojteklu / clean_code.md
Last active July 17, 2024 11:23
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@subfuzion
subfuzion / global-gitignore.md
Last active July 16, 2024 18:54
Global gitignore

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file:

  • Create a file called .gitignore in your home directory and add any filepath patterns you want to ignore.
  • Tell git where your global gitignore file is.

Note: The specific name and path you choose aren't important as long as you configure git to find it, as shown below. You could substitute .config/git/ignore for .gitignore in your home directory, if you prefer.