Skip to content

Instantly share code, notes, and snippets.

" neovim plugins
if &compatible
set nocompatible
endif
set runtimepath^=~/.config/nvim/dein/repos/github.com/Shougo/dein.vim
call dein#begin(expand('~/.config/nvim/dein'))
call dein#add('Shougo/dein.vim')
call dein#add('Shougo/vimproc.vim', {'build': 'make'})
call dein#add('Shougo/deoplete.nvim')
const webpack = require("webpack");
const HtmlPlugin = require("html-webpack-plugin");
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const helpers = require("./helpers");
const envPlugin = new webpack.DefinePlugin({
"ENV": JSON.stringify("bar")
});
module.exports = {
[
{
"name": "MANUFACTURING",
"businessTypes": [
{
"business_type": "Brewery, Microbrewery and IPA",
"business_category": "MANUFACTURING",
"permits": [
{
"friendly_name": "Site Plan Application",
const webpack = require("webpack");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const path = require("path");
const _root = path.resolve(__dirname);
function root(args) {
args = Array.prototype.slice.call(arguments, 0);
return path.join.apply(path, [_root].concat(args));
import { NgModule } from '@angular/core';
import { Paho } from 'ng2-mqtt';
@NgModule()
export class AppModule { }
app.launch(function(request, response) {
return Promise.resolve().then(() => {
const accessTokenReceived = request.sessionDetails.accessToken;
if (accessTokenReceived === undefined) {
throw 'no_access_token';
}
return user.getUserFromAccessTokenPromise(accessTokenReceived);
}).catch(() => {
throw 'not_good_access_token';
app.launch(function(request, response) { [8/89]
const accessTokenReceived = request.sessionDetails.accessToken;
if (accessTokenReceived === undefined) {
throw "no_access_token";
}
return user.getUserFromAccessTokenPromise(accessTokenReceived)
.then(user => stuff.getStuffFromUserPromise(user).then(() => user.id))
.then(userId => helper.getStaffUserIdPromise(userId))
.then(() => {
const fo = async ({stuff, userId}) => {
await new Promise(resolve => {
setTimeout(() => resolve(), 500);
});
console.log(stuff, userId);
};
fo({stuff: "a", userId: "b"});

For a long time, I had my own blog at one place or another. For a while, it was just at explosion-pills.com, then I popped up ghost on a DigitalOcean droplet at blog.explosion-pills.com. Finally, explosionpills.com became available, and now blog.explosionpills.com redirects to this medium blog that you’re reading through CloudFlare.

Deciding to move to Medium

I personally know a couple of people who use Medium as a blogging platform, and of course I follow a lot of famous or semi-famous people who blog directly on Medium. It has functionality that I can't take the time to implement in blogging software that I manage myself even if I think I could theoretically do it. Here, readers have access to comments, highlighting, and of course a broad network of content creators.

https://medium.com/@ExplosionPills/rxjs-switch-switchmap-and-other-map-operations-e8ccdfb7e5a9 is more up-to-date.

Exploring RxJS still feels like a jungle to me. Even when I think I understand something, I find out that I actually don't understand it. In my quest to truly understand it, I end up learning quite a lot more about some other topics or operations than the one I was originally trying to understand. This is generally a positive thing, but it still feels like traveling deep into a jungle to me.

Just today I was trying to learn how to use ngrx/store with ngrx/effects to use http requests with an ngrx/store-backed app. This introduced me to the RxJS Observable switchMap operator that I was not familiar with. The main question I came up with -- the question that I usually have when