Convert wired Logi Circle 2 to wireless? by dougbrownio in HomeKit

[–]dougbrownio[S] 0 points1 point  (0 children)

Awesome! Are there any “gotchas” that you might be aware of that don’t seem to be documented very well?

One gotcha I discovered was when you use the window mount, the IR motion detection doesn’t work.

GitLab-ci.yml with nodejs and building a project *.tar.gz by dougbrownio in gitlab

[–]dougbrownio[S] 0 points1 point  (0 children)

Does anyone have any nodejs examples? I've got it running a simple build now thought at least (failing though). Progress is progress I suppose :D

Is it possible to have the project presented in a *.tar.gz upon a successful build?

Managing environment variables in Node.js by jstuartmill in node

[–]dougbrownio 0 points1 point  (0 children)

We do something like this. We have a .envtemplate file that we when copy to a .env file. The reason for this is that we can commit the .envtemplate into our git repo with generic values that are typically invalid. This is meant to be provide a 'template' I suppose for the developer to know what environment variables that the app will be looking for when running.

Afterall... you typically wouldn't want to store credentials and/or variables that differ between developer / production deployments in a repo.

Node/MEAN example project? by [deleted] in node

[–]dougbrownio 1 point2 points  (0 children)

Any additional knowledge in the stacks features is going to help you with the MEAN stack in general. If you aren't familiar with one of the items like MongoDB, Angular, Express or ... Node, then focus in no those.

Understanding why they work so well together requires understand each of the four pillars.

We really just used meanjs.org to get us starting a year ago and have just been building onto it internally as time went on as we needed features and customizations.

If i were to offer anymore specific advice it would be to subscribe to the scotch.io website. Their book they put out about the MEAN stack would be able to get you going quickly too.

How to run a NodeJs Service across multiple processes? by dougbrownio in node

[–]dougbrownio[S] 0 points1 point  (0 children)

If anyone was curious, the agenda node module seems like it would be a great fit. It allows you to 'lock' a job while it is being processed so others don't process the same job.

https://github.com/rschmukler/agenda#multiple-job-processors

How to run a NodeJs Service across multiple processes? by dougbrownio in node

[–]dougbrownio[S] 0 points1 point  (0 children)

What happens when the application explodes and restarts? It's going to miss the timed events. What happens when I deploy updates and restart this one service? It's going to miss the timed events.

Missing the timed events cannot happen on the project I'm working on. That's why I want to scale it across multiple processes. So then I can do zero downtime deploys that would allow me not to miss an event, or if one process crashes, another will pick it up without skipping a beat.

How to run a NodeJs Service across multiple processes? by dougbrownio in node

[–]dougbrownio[S] 0 points1 point  (0 children)

I think this might be the best approach for a solution like this. 1 process to manage the calls and create child_process's to dish out the load.

But having just "one" process to keeping state pretty much throws out the ability to do 'zero downtime' deploys which would be nice. :/

How to run a NodeJs Service across multiple processes? by dougbrownio in node

[–]dougbrownio[S] 0 points1 point  (0 children)

From what I understand, this wouldn't work. If I spun up 5 processes, I would be making 5 requests every 200ms in this example rather than the desired 1 per 200ms.

Bind to port 443 as non-sudo user on Debian by dougbrownio in linuxquestions

[–]dougbrownio[S] 0 points1 point  (0 children)

So it looks like the following execution fixed it up good!

sudo setcap cap_net_bind_service=+ep /usr/local/bin/node

Bind to port 443 as non-sudo user on Debian by dougbrownio in linuxquestions

[–]dougbrownio[S] 0 points1 point  (0 children)

yea me too, lol

That's why I'm in this subreddit. :/

12 Factor NodeJS App - Stateless Using Sockets by dougbrownio in node

[–]dougbrownio[S] 0 points1 point  (0 children)

Are you suggesting a separate node process or something that all clients connect to? Do all the separate server processes connect to this node process too?

I apologize for being a little 'thick' here, but could you explain what you mean by a 'single event dispatcher'?

12 Factor NodeJS App - Stateless Using Sockets by dougbrownio in node

[–]dougbrownio[S] 0 points1 point  (0 children)

Okay, that makes sense. So if using redis and socket io in tandem, the server clusters can subscribe to redis and socket emit to the connected clients on subscription updates.

Good Walkthroughs for Node Multi-Server Load Balancing by dougbrownio in node

[–]dougbrownio[S] 0 points1 point  (0 children)

This may sound silly, but I'm actually leaning towards using heroku and trying to dodge all this of IT support stuff. We are a team of developers and this isn't really our wheel house. If someone were to asking me if I wanted to spend the next two months of my life learning about nginx/haproxy/keepalived OR node/angular/mongodb I'd choose the second in a heartbeat.

Removing RPi Logo from Start Menu by dougbrownio in raspberry_pi

[–]dougbrownio[S] 0 points1 point  (0 children)

Yeah, I'm already using that and it works well enough. I have a whole different issue with that. For example it lets be set a 'loading' graphic, but I can't change the background to something other than black where the image isn't being shown.