I hereby claim:
- I am stanShumsky on github.
- I am shumsky (https://keybase.io/shumsky) on keybase.
- I have a public key whose fingerprint is 2C79 CA84 6A72 30E5 37B8 9856 0FB7 6A57 8715 91F6
To claim this, I am signing this object:
{ | |
"version": "0.1.0", | |
// List of configurations. Add new configurations or edit existing ones. | |
// ONLY "node" and "mono" are supported, change "type" to switch. | |
"configurations": [ | |
{ | |
// Name of configuration; appears in the launch configuration drop down menu. | |
"name": "Run app.js", | |
// Type of configuration. Possible values: "node", "mono". | |
"type": "node", |
// array utils | |
// ================================================================================================= | |
const combine = (...arrays) => [].concat(...arrays); | |
const compact = arr => arr.filter(Boolean); | |
const contains = (() => Array.prototype.includes | |
? (arr, value) => arr.includes(value) | |
: (arr, value) => arr.some(el => el === value) |
I hereby claim:
To claim this, I am signing this object:
var mongoose = require('mongoose') | |
, Podcast = mongoose.model('Podcast'); | |
Podcast.find({}).remove(function() { | |
Podcast.create({ | |
title: 'Joe Rogan', | |
score: 4783, | |
tags: ['tag1', 'tag2', 'tag3'], | |
dateSubmitted: new Date | |
}, { |
var mongoose = require('mongoose'); | |
var Schema = mongoose.Schema; | |
var validator = require('validator'); | |
var EntrySchema = new Schema({ | |
email: { | |
type: String, | |
required: true, | |
validate: [validator.isEmail, 'invalid email'] | |
}, |
var express = require('express'); | |
var bodyParser = require('body-parser'); | |
var mongoose = require('mongoose'); | |
var morgan = require('morgan'); | |
var jwt = require('jsonwebtoken'); | |
var app = express(); | |
var router = express.Router(); | |
var config = require('./config'); |
var schema = new Schema({ | |
name: String, | |
binary: Buffer, | |
living: Boolean, | |
updated: { type: Date, default: Date.now } | |
age: { type: Number, min: 18, max: 65 } | |
mixed: Schema.Types.Mixed, | |
_someId: Schema.Types.ObjectId, | |
array: [], | |
ofString: [String], |
var mongoose = require('mongoose'), | |
Schema = mongoose.Schema; | |
var PositionSchema = new Schema({ | |
company : String, | |
position : String, | |
summary : String, | |
startDate : Date | |
}); |
A very basic / high-level example of how to use locally scoped cssmodules in Angular, via Webpack using the css-loader
.
Read the cssmodules readme and the css-loader README for lots more high-level information. Also checkout the lower-level ICSS (interoperable css) spec/readme for the nitty gritty.
Tl;dr this approach solves many of the same problems BEM sets out to solve
This would require a refactor of existing codebases to use Webpack. But beyond that (which may or may not be trivial depending on many different factors) it appears to be a maintainable and scalable strategy.
Check out this gulp-webpack-angular-seed I put together some time ago as well as the this resume application and this mnutrition branch for examples o
{ | |
"ambientDependencies": { | |
"angular-protractor": "github:DefinitelyTyped/DefinitelyTyped/angular-protractor/angular-protractor.d.ts#64b25f63f0ec821040a5d3e049a976865062ed9d", | |
"es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#6697d6f7dadbf5773cb40ecda35a76027e0783b2", | |
"hammerjs": "github:DefinitelyTyped/DefinitelyTyped/hammerjs/hammerjs.d.ts#74a4dfc1bc2dfadec47b8aae953b28546cb9c6b7", | |
"jasmine": "github:DefinitelyTyped/DefinitelyTyped/jasmine/jasmine.d.ts#4b36b94d5910aa8a4d20bdcd5bd1f9ae6ad18d3c", | |
"node": "github:DefinitelyTyped/DefinitelyTyped/node/node.d.ts#8cf8164641be73e8f1e652c2a5b967c7210b6729", | |
"selenium-webdriver": "github:DefinitelyTyped/DefinitelyTyped/selenium-webdriver/selenium-webdriver.d.ts#a83677ed13add14c2ab06c7325d182d0ba2784ea", | |
"webpack": "github:DefinitelyTyped/DefinitelyTyped/webpack/webpack.d.ts#95c02169ba8fa58ac1092422efbd2e3174a206f4" | |
} |