This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Suppose we have a schema as follows | |
var User = require('./schemas/UserSchema').User; | |
and we want to write unit test for like bellow code: | |
var getUserById = function () { | |
return User.findOne({_id: '001'}).exec(); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://certbot.eff.org/#ubuntutrusty-nginx | |
https://askubuntu.com/questions/363200/e-unable-to-correct-problems-you-have-held-broken-packages | |
Use aptitude instead of apt-get. It is more intelligent. It not only will handle downgrading conflicting packages for you, but will make a series of recommendations asking you which of many possible suggested working scenarios you would like. | |
sudo aptitude install myNewPackage | |
If you don't have aptitude on your machine yet, get it with |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Need to create extension: | |
1. manifest.json | |
2. 19x19px PNG file | |
3. popup.html | |
4. popup.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://gist.github.com/crtr0/2896891 | |
https://socket.io/docs/rooms-and-namespaces/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm -g install yo | |
npm -g install generator-backbone | |
https://books.google.com.bd/books?id=5NPGAwAAQBAJ&pg=PA143&lpg=PA143&dq=generator-backbone-fullstack&source=bl&ots=txake5LXcg&sig=S_2RU2sUcHy5ePYV7dG4BSS8u_Q&hl=en&sa=X&redir_esc=y#v=onepage&q&f=false | |
https://github.com/yeoman/generator-backbone#readme | |
https://github.com/pusongyang/generator-fullstack-backbone |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.microsoft.com/net/core#linuxubuntu | |
https://stackoverflow.com/questions/37460631/asp-net-core-test-site-cant-be-reached | |
The Kestrel web server defaults to listening on localhost:5000, so if you haven't changed what host it listens on you won't be able to connect to it from a remote machine (or in your case, the host machine). | |
There are several ways that you can configure Kestrel to listen on a different host or port. The simplest implementation would be to add the line .UseUrls("http://0.0.0.0:5000") right after .UseKestrel() in your Main method. This would make the application listen on all available IP addresses using port 5000. | |
Update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Middleware functions can perform the following tasks: | |
1. Execute any code. | |
2. Make changes to the request and the response objects. | |
3. End the request-response cycle. | |
4. Call the next middleware function in the stack. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Link: https://obsproject.com/forum/resources/how-to-set-up-your-own-private-rtmp-server-using-nginx.50/ | |
apt-get install build-essential libpcre3 libpcre3-dev libssl-dev | |
wget http://nginx.org/download/nginx-1.9.15.tar.gz | |
wget https://github.com/arut/nginx-rtmp-module/archive/master.zip | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Source: https://www.liquidweb.com/kb/how-to-install-and-configure-vsftpd-on-ubuntu-14-04-lts/ | |
https://www.digitalocean.com/community/tutorials/how-to-create-a-sudo-user-on-ubuntu-quickstart |
NewerOlder