Skip to main content

Posts

Showing posts from June, 2017

Vim as an IDE

https://stackoverflow.com/questions/1889602/how-to-switch-between-multiple-vim-configurations-with-a-command-or-local-vimrc http://vimawesome.com/ https://stackoverflow.com/questions/28340968/how-to-install-nerdtree-plugin-on-linuxmint-for-vim74 http://chrisstrelioff.ws/sandbox/2014/05/29/install_and_setup_vim_on_ubuntu_14_04.html

NodeJS, ExpressJS, Socket.IO code structure

https://stackoverflow.com/questions/28399536/how-to-best-structure-an-express-v4-11-project-with-socket-io How to deal with cyclic dependencies in Node.js https://stackoverflow.com/questions/10869276/how-to-deal-with-cyclic-dependencies-in-node-js While node.js does allow circular require dependencies, as you've found it can be pretty messy and you're probably better off restructuring your code to not need it. Maybe create a third class that uses the other two to accomplish what you need. Circular dependencies are code smell. If A and B are always used together they are effectively a single module, so merge them. Or find a way of breaking the dependency; maybe its a composite pattern. Not always. in database models, for example, if I have model A and B, in model A I may want to reference model B (e.g. to join operations), and vice-versa. Therefore, export several A and B properties (the ones that does not depend on other modules) before use the "require" func

Docker, gcm Web ref

https://www.ctl.io/developers/blog/post/gracefully-stopping-docker-containers http://odewahn.github.io/docker-jumpstart/building-images-with-dockerfiles.html http://www.pushwatch.com/gcm/ http://apns-gcm.bryantan.info/ https://docs.docker.com/engine/tutorials/dockervolumes/ https://stackoverflow.com/questions/33743605/bcrypt-installation-fails-in-docker It is crashing because you are missing some essentials tool for the compilation purposes of Bcrypt. Bcrypt needs to be compiled each time you do npm install to crate a version for the operating system that is running on since it is written in C. For those that would like to use the original Bcrypt, you can run the following docker command: docker run -t -i --rm -v $(pwd):/app -w /app node:slim sh -c 'apt-get update && apt-get install -y build-essential && apt-get install -y python && npm install' Before we do npm install we need to: apt-get update: make sure the package management system

Bitbucket 2GB Hard limit

The answer is that "Contact Bitbucket". https://stackoverflow.com/questions/24493071/how-to-reduce-git-repo-size-on-bitbucket/24518142#24518142 There are some tool using in clean .git folder, history ... push --force bfg java tool git filter branch du - disk usage ... Rewrite history cause some problems. Git / Bitbucket lose history (different hash). So merged branch show not merged. ... Mange big/huge repo. Wordpress media/uploads/plugins, how to ignore N/or maintain it.