- Make swap
sudo dd if=/dev/zero of=/mnt/myswap.swap bs=1M count=4000
sudo mkswap /mnt/myswap.swap
sudo swapon /mnt/myswap.swap| # Permissions 0644 for '/root/.ssh/id_rsa' are too open. | |
| chmod 400 ~/.ssh/id_rsa | |
| # Update apt-get | |
| sudo apt-get update | |
| # Enable firewall | |
| sudo apt-get install ufw | |
| sudo ufw disable | |
| sudo ufw allow 22 | |
| sudo ufw allow 80 |
| git status -u --porcelain | egrep -h '^[^D]{2}.*\.js$' | cut -c 4- | xargs eslint |
| { | |
| "binary_file_patterns": | |
| [ | |
| "*.doc", | |
| "*.docx", | |
| "*.eot", | |
| "*.gif", | |
| "*.gzip", | |
| "*.ico", | |
| "*.jar", |
| String.prototype.trunc = function(n) { | |
| if (this.length <= n) { | |
| return this; | |
| } | |
| var truncated = this.substr(0, n); | |
| if (this.charAt(n) === ' ') { | |
| return truncated; | |
| } | |
| return truncated.substr(0, truncated.lastIndexOf(' ')); | |
| }; |