brew install mongodb
Set up launchctl to auto start mongod
$ ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents
/usr/local/opt/mongodb/
is a symlink to /usr/local/Cellar/mongodb/x.y.z
(e.g., 2.4.9
)
// require() some stuff from npm (like you were using browserify) | |
// and then hit Rebuild to run it on the right | |
var esformatter = require( 'esformatter' ); | |
var esformatterJSX = require( 'esformatter-jsx' ); | |
var collapser = require('esformatter-collapse-objects') | |
var throttle = require('lodash.throttle'); | |
var testCode = | |
'/*\nHere are three es6 related issues with standard-format.\nOne can be solved by a setting I suppose. The others probably require a \nfix in esformatter\n*/\n' + | |
'class Foo extends React.Component {\n' + |
/* ---------------------------------------------------------------------------------------------------- | |
Super Form Reset | |
A couple of things to watch out for: | |
- IE8: If a text input doesn't have padding on all sides or none the text won't be centered. | |
- The default border sizes on text inputs in all UAs seem to be slightly different. You're better off using custom borders. | |
- You NEED to set the font-size and family on all form elements | |
- Search inputs need to have their appearance reset and the box-sizing set to content-box to match other UAs |
import { builtinModules } from "node:module"; | |
import { resolve } from "node:path"; | |
import { defineConfig } from "vite"; | |
import { dependencies, name } from "./package.json"; | |
/** | |
* Core modules could be imported in two ways, with or without the `node:` | |
* specifier, so we create a list of all possible core modules. | |
*/ | |
const allCoreModules = builtinModules.flatMap((moduleName) => [ |
The article below was posted on Dev.to
Ever since I started using Firestore more than 7 years ago, I have been wanting to find a better way to type my code and reduce boilerplate. In this article I will explain how I finally found a way to write clean, strongly-typed code with abstractions that are easy to use and adopt in any Typescript project.
By defining typed reusable references for all database collections, we can let other functions infer their types from them, sparing us from having to import and apply types all over the place.
I would like to use the Codecompose organization because that's my company name, but someone on Github had the name already and it seems like a sleeping account. I would like to get in touch. |