By Default 'jekyll serve' makes jekyll accessible on 127.0.0.1 (localhost).
To make it accessible by outsiders, use --host 0.0.0.0 with it.
jekyll serve --host 0.0.0.0
/* Best way to check whether a variable is string or not */ | |
function isString(o) { | |
return typeof o == "string" || (typeof o == "object" && o.constructor === String); | |
} |
/* mongodb version 3.2 */ | |
mongod --storageEngine wiredTiger --dbpath="./data/" | |
/* Migrate data from mmapv1 by taking a dump of data from db using mmapv1 and restore on wiredTiger */ | |
/* Ref: https://gist.github.com/dineshsprabu/06f2ede79753ff4f43f5 */ |
var crawler = function(initialIPPool){ | |
//private variable | |
var privateVariable = 10; | |
//instance variable; | |
this.pool = initialIPPool; | |
//private function | |
var privateCrawler = function(privatePool){ |
/*Insert collection returns promise*/ | |
var insertCollection = function(collectionName,doc){ | |
var collection = db.get(collectionName); | |
return collection.insert(doc); | |
} | |
/* using the function which returns promise */ | |
insertCollection('collection_name',{'key':'value'}) | |
.success(function(){ |
var Promise = require('bluebird'); | |
var monk = require('monk'); | |
var db = //your db connection; | |
/*Inserting multiple doc is possible collection.col.insert | |
But it will not return promise, so returning our own promise*/ | |
var insertMultiple = function(collectionName, docArray){ | |
return new Promise(function(resolve,reject){ |
Dependencies | |
sudo apt-get install ruby ruby-dev make gcc nodejs | |
Jekyll Installation: | |
sudo gem install jekyll --no-rdoc --no-ri | |
If jekyll installation fails use the below command to install. |
1. Create a file CNAME on the gh-pages Branch. | |
2. Type your domain name and save the CNAME file. eg. dppages.com | |
3. Goto you domain settings on domain registered site (godaddy, bigrock, etc.,). | |
4. Add the IPs below on the 'A' record. | |
192.30.252.153 | |
192.30.252.154 |
By Default 'jekyll serve' makes jekyll accessible on 127.0.0.1 (localhost).
To make it accessible by outsiders, use --host 0.0.0.0 with it.
jekyll serve --host 0.0.0.0
/* This will return size of document object in bytes */ | |
Object.bsonsize(<document>); |
.shadow-div{ | |
-moz-box-shadow:5px 5px 7px rgba(33,33,33,1); | |
/* Safari+Chrome */ | |
-webkit-box-shadow: 5px 5px 7px rgba(33,33,33,.7); | |
/* Opera */ | |
box-shadow: 5px 5px 7px rgba(33,33,33,.7); | |
} |