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
Grab a USB stick, make sure there’s nothing on it you need (as it will be deleted!), and follow these steps: | |
Plug it in. If it automounts, unmount it. | |
Type: sudo mkswap /dev/sdb1 (or whatever your device path is) | |
Then type: sudo swapon -p 32767 /dev/sdb1 (the 32767 makes it a higher priority and will thus be used before the hard drive swap drive) | |
To make sure everything went well, type: | |
$ cat /proc/swaps | |
If you need to take the stick out, type: | |
$ sudo swapoff /dev/sdb1 | |
Since I’ll be leaving this in the back of my desktop, first I got the UUID of the drive by typing: |
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
1. In App.java | |
place this code in the public class App section | |
static int getHerokuAssignedPort() { | |
ProcessBuilder processBuilder = new ProcessBuilder(); | |
if (processBuilder.environment().get("PORT") != null) { | |
return Integer.parseInt(processBuilder.environment().get("PORT")); | |
} | |
return 4567; //return default port if heroku-port isn't set (i.e. on localhost) |
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
installations | |
npm install gulp-concat --save-dev | |
npm install vinyl-source-stream --save-dev | |
sudo npm install gulp -g | |
npm install gulp-uglify | |
npm install gulp-util --save-dev | |
npm install del --save-dev | |
npm install jshint --save-dev | |
npm install gulp-jshint --save-dev | |
npm install browser-sync --save-dev |