- Clear feature ownership
- Module usage predictibility (refactoring, maintainence, you know what's shared, what's not, prevents accidental regressions, avoids huge directories of not-actually-reusable modules, etc)
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 webpack = require("webpack"); | |
| const path = require("path"); | |
| const HtmlWebpackPlugin = require("html-webpack-plugin"); | |
| const ExtractTextPlugin = require("extract-text-webpack-plugin"); | |
| const InterpolateHtmlPlugin = require("react-dev-utils/InterpolateHtmlPlugin"); | |
| const Hot = webpack.HotModuleReplacementPlugin; | |
| const NamedPlugin = webpack.NamedModulesPlugin; | |
| module.exports = (env = {}) => { | |
| return { objectGoesHere }; |
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
| { | |
| test: /\.tsx?$/, | |
| use: ["babel-loader","awesome-typescript-loader"], | |
| }, | |
| { | |
| use: [ | |
| { | |
| loader: 'awesome-typescript-loader', | |
| options: { | |
| transpileOnly: true, |
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 /// | |
| var express = require('express'); | |
| var router = express.Router(); | |
| /* GET home page. */ | |
| router.get('/', function(req, res, next) { | |
| res.status(200).set({ | |
| 'Content-Type': 'text/event-stream', | |
| 'Cache-Control': 'no-cache', |
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
| #!/usr/bin/env node | |
| console.log("hi all from gists"); |
Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt
If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a
I will be using the root user, but would suggest creating a new user
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
| class DynamicMethods{ | |
| constructor(action){ | |
| for (const key in action) { | |
| DynamicMethods[`${key}`] = new Function(`cb`, `${action[key]}`); | |
| } | |
| } | |
| } | |
| const action = { |
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
| #!/usr/bin/env node | |
| import { execSync } from "node:child_process"; | |
| const packages = { | |
| claude: "@anthropic-ai/claude-code", | |
| gemini: "@google/gemini-cli", | |
| copilot: "@github/copilot", | |
| codex: "@openai/codex", | |
| }; |