Skip to content

Instantly share code, notes, and snippets.

View ninjachen's full-sized avatar
🥝
Food makes me happy

Ninja Chen ninjachen

🥝
Food makes me happy
  • Shanghai, China
View GitHub Profile
@ninjachen
ninjachen / InstallZshOnCentOS.md
Last active August 20, 2018 05:42 — forked from rkaneko/InstallZshOnCentOS.md
Installing zsh on CentOS

Installing zsh on CentOS

$ sudo yum install ncurses-devel

$ cd /usr/local/src

$ sudo curl -L https://sourceforge.net/projects/zsh/files/zsh/5.5.1/zsh-5.5.1.tar.gz/download -o zsh-5.5.1.tar.gz

unicorn config file

Edit file /home/gitlab/gitlab/config/unicorn.rb

Find line listen "#{app_dir}/tmp/sockets/gitlab.socket" and comment it. Uncomment line listen "127.0.0.1:8080"

required modules for apache

  • sudo a2enmod proxy
  • sudo a2enmod proxy_http

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying