This file contains hidden or 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
| server { | |
| listen 80; | |
| listen [::]:80; | |
| server_name SERVER.COM; | |
| location / { | |
| proxy_pass http://localhost:3000; | |
| proxy_http_version 1.1; | |
| proxy_set_header Upgrade $http_upgrade; |
This file contains hidden or 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
| function guid() { | |
| function _p8(s) { | |
| var p = (Math.random().toString(16)+"000000000").substr(2,8); | |
| return s ? "-" + p.substr(0,4) + "-" + p.substr(4,4) : p ; | |
| } | |
| return _p8() + _p8(true) + _p8(true) + _p8(); | |
| } |
This file contains hidden or 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://zocada.com/setting-mongodb-users-beginners-guide/ |
This file contains hidden or 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
| bash <(curl -f -L -sS https://ngxpagespeed.com/install) \ | |
| --nginx-version "1.12.1" \ | |
| --dynamic \ | |
| -a '--with-http_ssl_module | |
| --with-http_realip_module | |
| --with-http_dav_module | |
| --with-http_gzip_static_module | |
| --with-http_gunzip_module |
This file contains hidden or 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
| // Future versions of Hyper may add additional config options, | |
| // which will not automatically be merged into this file. | |
| // See https://hyper.is#cfg for all currently supported options. | |
| module.exports = { | |
| config: { | |
| // choose either `'stable'` for receiving highly polished, | |
| // or `'canary'` for less polished but more frequent updates | |
| updateChannel: 'stable', |
This file contains hidden or 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
| var swipeFunc = { | |
| touches : { | |
| "touchstart": {"x":-1, "y":-1}, | |
| "touchmove" : {"x":-1, "y":-1}, | |
| "touchend" : false, | |
| "direction" : "undetermined" | |
| }, | |
| touchHandler: function(event) { | |
| var touch; | |
| if (typeof event !== 'undefined'){ |
This file contains hidden or 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
| /* HTML */ | |
| <div class="container"> | |
| <div class="child"></div> | |
| <div> | |
| /* Basic Style */ | |
| .container { | |
| width: 500px; |
This file contains hidden or 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
| /** | |
| * To get started install | |
| * express bodyparser jsonwebtoken express-jwt | |
| * via npm | |
| * command :- | |
| * npm install express bodyparser jsonwebtoken express-jwt --save | |
| */ | |
| // Bringing all the dependencies in | |
| const express = require('express'); |
This file contains hidden or 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
| let getDimentions = (length, height) => ({length, height}); | |
| // It is same as | |
| getDimentions = (length, height) => { | |
| return {length: length, height: height}; | |
| }; | |
| // function arguments defaults: Old way | |
| getDimentions = (length, height) => { | |
| if (!length) { |
This file contains hidden or 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
| [ | |
| { | |
| "countryName": "Afghanistan", | |
| "countryCode": "AF", | |
| "callingCode": "+93", | |
| "flag": "https://upload.wikimedia.org/wikipedia/commons/9/9a/Flag_of_Afghanistan.svg" | |
| }, | |
| { | |
| "countryName": "Aland Islands", | |
| "countryCode": "AX", |