Custom recipe to get OS X 10.11 El Capitan running from scratch with useful applications and Node.js Developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after fresh install.
/var/lib/redis/logs/redis.log { | |
daily | |
rotate 14 | |
copytruncate | |
delaycompress | |
compress | |
notifempty | |
missingok | |
} |
#!/bin/bash | |
#Check if user is root | |
if [ $UID != 0 ]; then | |
echo "You need to be root to use this script." | |
exit 1 | |
fi | |
echo "docker-nuke exists to do one thing; clean up your Docker environment. It's not called docker-carefully-and-nicely-spritz-up. Be carefully!" | |
echo |
# This is an annotated subset of the Nginx configuration from our Magento production platform @ www.hypernode.com | |
# See https://www.byte.nl/blog/magento-cacheleak-issue | |
# !!!! If you are a Hypernode customer, do not use this config as it will result in duplicate statements. !!!!! | |
user app; | |
worker_processes 4; | |
pid /var/run/nginx.pid; | |
events { |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
DEPRECATED as of macOS 10.13 (High Sierra). See the new GUIDE to install nvm and yarn for macOS (updated July 2019)
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.
This solution fixes the error caused by trying to run npm update npm -g
. Once you're finished, you also won't need to use sudo
to install npm modules globally.
VAGRANTFILE_API_VERSION = "2" | |
require 'io/console' | |
# Capture login details if starting up vagrant or provisioning it | |
# Required for AD operations. | |
# | |
# Environment variables prevent explicit user input. Useful for CI. | |
username = ENV["VAGRANT_USER"] || nil | |
password = ENV["VAGRANT_PASSWORD"] || nil |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
babel-plugin-add-module-exports
generates an incorrect bundle if you use ES modules in the latest versions of Webpack 2 (at least in 2.1.0-beta.27
and .28
). Here’s what to do.
{
"plugins": [
- "add-module-exports"
]
}
# brew install nginx | |
sudo ln -s /usr/local/opt/nginx/homebrew.mxcl.nginx.plist /Library/LaunchDaemons/ | |
sudo chown root:wheel /usr/local/opt/nginx/homebrew.mxcl.nginx.plist | |
sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.nginx.plist | |
# Why do you need sudo? | |
# If you want nginx to be able to bind to port 80, it will need superuser privileges |