- You are using MacOS 10 or above
- Have Homebrew installed
- You need a dev-only setup
brew cask install minishift
brew cask install virtualbox
brew cask install minishift
brew cask install virtualbox
Sample script that allows you to define as environment variables the name of the docker secret that contains the secret value. It will be in charge of analyze all the environment variables searching for the placeholder to substitute the variable value by the secret.
You can define the next environment variables:
I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.
I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.
Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.
| require('rootpath')(); | |
| var mongoose = require('mongoose'); | |
| var async = require('async'); | |
| var _ = require('lodash'); | |
| var Query = mongoose.Query; | |
| Query.prototype._batchinate = function(options, callback) { | |
| var query = this; | |
| var model = query.model; |
| /*! | |
| * @fileOverview Finance Excel Rate Formula Javascript Equivalent | |
| * @version 1.0.0 | |
| * | |
| * @author Burak Arslan @kucukharf http://www.github.com/kucukharf | |
| * @license | |
| * Copyright (c) 2010-2018 Burak Arslan | |
| * Licensed under Creative Commons (CC) license | |
| * @usage RATE($periods, $payment, $present, $future, $type, $guess) | |
| */ |
I say "animated gif" but in reality I think it's irresponsible to be serving "real" GIF files to people now. You should be serving gfy's, gifv's, webm, mp4s, whatever. They're a fraction of the filesize making it easier for you to deliver high fidelity, full color animation very quickly, especially on bad mobile connections. (But I suppose if you're just doing this for small audiences (like bug reporting), then LICEcap is a good solution).
| // a list of useful queries for profiler analysis. Starting with the most basic. | |
| // 2.4 compatible | |
| // | |
| // output explained: | |
| // | |
| { | |
| "ts" : ISODate("2012-09-14T16:34:00.010Z"), // date it occurred | |
| "op" : "query", // the operation type | |
| "ns" : "game.players", // the db and collection |
mix3d asked for some help using this guide with windows so here we go. This was tested with Windows 10. Run all commands in Git Bash once it's installed.
Github will be the main account and bitbucket the secondary.
| // Example usage: | |
| // deepPopulate(blogPost, "comments comments._creator comments._creator.blogposts", {sort:{title:-1}}, callback); | |
| // Note that the options get passed at *every* level! | |
| // Also note that you must populate the shallower documents before the deeper ones. | |
| function deepPopulate(doc, pathListString, options, callback) { | |
| var listOfPathsToPopulate = pathListString.split(" "); | |
| function doNext() { | |
| if (listOfPathsToPopulate.length == 0) { | |
| // Now all the things underneath the original doc should be populated. Thanks mongoose! | |
| callback(null,doc); |