A very basic and quick TLDR; installation of redis for OSX and Linux users.
$ brew install redis
In your command-line run the command: brew update
brew install postgresql
const express = require('express'); | |
const path = require('path'); | |
const bodyparser = require('body-parser'); | |
const passport = require('passport'); | |
const LocalStrategy = require('passport-local').Strategy; | |
// const cookieParser = require('cookie-parser'); | |
const session = require('express-session') | |
const RedisStore = require('connect-redis')(session); |
# as super user after pointing domain to server. ref: https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-14-04 | |
cd /usr/local/sbin | |
wget https://dl.eff.org/certbot-auto | |
chmod a+x /usr/local/sbin/certbot-auto | |
certbot-auto certonly -a webroot --webroot-path=/usr/share/nginx/html -d [[site.com]] -d www.[[site.com]] | |
openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 | |
# as root, edit the nginx config for the site you just set up | |
vim /etc/nginx/conf.d/[[site.com]].conf | |
# when editing the file, just follow all the directions to comment and uncomment TLS-related config |
" Break away from vi | |
set nocompatible | |
" Map Leader to space | |
let mapleader = "\<Space>" | |
let g:mapleader = "\<Space>" | |
" Basic Stuff | |
set number |
/* SudokuValidator(sudoku) | |
* | |
* @param sudoku a multidimensional array containing the sudoku puzzle | |
* | |
* @public property sudoku the sudoku grid | |
* | |
* @public method validate(num) num is the squared value or max value of sudoku number | |
for example: 9(result of 3x3 grid) or 4 (2x2). | |
*/ |
library(idbr) # devtools::install_github('walkerke/idbr') | |
library(ggplot2) | |
library(animation) | |
library(dplyr) | |
library(ggthemes) | |
idb_api_key("Your Census API key goes here") | |
male <- idb1('JA', 2010:2050, sex = 'male') %>% | |
mutate(POP = POP * -1, |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
Before starting run the commands brew doctor
and then brew update
Unix Users please install using the docs
$ brew install mongodb
Once brew is done installing, take note of the Caveats section that is printed to your console. Just like what we did previously for postgres it might be best to create a symlink then two aliases to start and stop the mongo progress.
If you have already installed any of these programs before, then you may skip it.
Scroll to the bottom of the page and find the install code for your operating system: