sudo apt install apache2
sudo ufw app list
sudo ufw allow in "Apache"
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
| # Place this blurb at the top of your Vagrantfile to allow the unpatched | |
| # version of the Vagrant vagrant-vbguest plugin to properly execute | |
| # in newer Ruby environments where File.exists is no longer supported | |
| # | |
| # Extend the Ruby File class to restore the deprecated exists method | |
| # calls File.exist instead | |
| unless File.respond_to?(:exists?) | |
| class << File | |
| def exists?(path) | |
| warn "File.exists? is deprecated; use File.exist? instead." unless ENV['SUPPRESS_FILE_EXISTS_WARNING'] |
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
| # Pass the env-vars to MYCOMMAND | |
| eval $(egrep -v '^#' .env | xargs) MYCOMMAND | |
| # … or ... | |
| # Export the vars in .env into your shell: | |
| export $(egrep -v '^#' .env | xargs) |
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
| // mongoose 4.3.x | |
| var mongoose = require('mongoose'); | |
| /* | |
| * Mongoose by default sets the auto_reconnect option to true. | |
| * We recommend setting socket options at both the server and replica set level. | |
| * We recommend a 30 second connection timeout because it allows for | |
| * plenty of time in most operating environments. | |
| */ | |
| var options = { server: { socketOptions: { keepAlive: 300000, connectTimeoutMS: 30000 } }, |
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
| #!/bin/bash | |
| # Noah Betzen | |
| # Ubuntu 14.04 Basic Setup | |
| #################### VARIABLES TO CHANGE | |
| SSHPORT=22 # change this if you want | |
| WEBPORT=80 # change this if you want | |
| HTTPSPORT=443 # change this if you want | |
| #################### DO NOT EDIT BELOW THIS LINE |
Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.
- The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.
Translations: (No guarantee that the translations are up-to-date)
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
| /** | |
| * Created by jadhavk on 1/14/15. | |
| */ | |
| // Load all the models | |
| var mongoose = require('mongoose'); | |
| mongoose.model('Category', require('../models/category').Category); | |
| mongoose.model('SubCategory', require('../models/category').SubCategory); | |
| mongoose.model('Location', require('../models/location').Location); | |
| mongoose.model('User', require('../models/user').User); |
Leverages Angular UI Router instead of core ngRoute module. UI Router allows
us to organize our application interface into a state machine.
Unlike the $route service in the Angular ngRoute module, which is organized around URL routes, UI-Router
is organized around states, which may optionally have routes, as well as other behavior, attached.
LIFT* Organization principle:
- L - Locating code easy
- I - Identify code at a glance
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
| // Restify Server CheatSheet. | |
| // More about the API: http://mcavage.me/node-restify/#server-api | |
| // Install restify with npm install restify | |
| // 1.1. Creating a Server. | |
| // http://mcavage.me/node-restify/#Creating-a-Server | |
| var restify = require('restify'); |
NewerOlder