- When Gatsby starts up, it will read
gatsby-config.jsfirst. - As you can see below, we use that file to
require('ts-node').register()which registers a TypeScript evaluator that will be used when Gatsby reads all other API Javascript files. In other words, we only need to do this once in our entire codebase and not in other Gatsby files likegatsby-node.js. - Our
gatsby-config.jsre-exports all the exported variables available ingatsby-config.ts.
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
| var gulp = require('gulp'); | |
| var sass = require('gulp-sass'); | |
| var postcss = require('gulp-postcss'); | |
| gulp.task('style', function () { | |
| var tailwindcss = require('tailwindcss'); | |
| return gulp.src('sass/**/*.scss') | |
| .pipe(sass().on('error', sass.logError)) | |
| .pipe(postcss([ |
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
| # Mailhog | |
| MAIL_MAILER=smtp | |
| MAIL_HOST=0.0.0.0 | |
| MAIL_PORT=1025 | |
| MAIL_USERNAME=null | |
| MAIL_PASSWORD=null | |
| MAIL_ENCRYPTION=null |
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
| # Find the latest version on https://github.com/creationix/nvm#install-script | |
| $ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash | |
| # Add in your ~/.zshrc the following: | |
| export NVM_DIR=~/.nvm | |
| [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" | |
| $ source ~/.zshrc |
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
| // Setup Firestore. Note that all of these will be asyncronous tasks and can have a .then attached. Write in a config process for Firebase. Include the necessary process.env files and instructions how to make a .env file. | |
| *************************************************************** | |
| // Add data - C | |
| firestore.collection("CollectionName").add({ | |
| key: value, | |
| key: value, | |
| }) |
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
| @layer utilities { | |
| .text-gradient { | |
| background-clip: text; | |
| -webkit-text-fill-color: transparent; | |
| } | |
| } |
This script automates the initial setup process for a new Linux server, focusing on basic security and maintenance tasks. It is designed to save time and ensure consistency when configuring multiple servers.
Manually setting up a Linux server can be time-consuming and prone to errors. This script automates the essential steps, ensuring that your server is configured securely and efficiently. It covers:
- Updating and upgrading system packages
- Creating a new user and granting sudo privileges
OlderNewer