Skip to content

Instantly share code, notes, and snippets.

View jentanbernardus's full-sized avatar
:shipit:
Coding everyday keeps the doctor away!

Jentan Bernardus jentanbernardus

:shipit:
Coding everyday keeps the doctor away!
View GitHub Profile
@jentanbernardus
jentanbernardus / README.md
Created May 22, 2016 17:53 — forked from AlexZeitler/README.md
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default and default-ssl to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/

1 Sign up - (Droplets & SSH Keys setup) 2 In terminal ssh root@your_ip_address 3 Install Git : Instruction

sudo apt-get update
sudo apt-get install git

and add to github account setting ssh key. 4 Install nginx - Follow this steps

sudo apt-get update
sudo apt-get install nginx
#default website
@jentanbernardus
jentanbernardus / digitalocean.md
Created May 2, 2016 07:43 — forked from stevenchanin/digitalocean.md
Setup instructions for Digital Ocean VPS using Ubuntu and Rails 3.2 #digitalocean #vps #setup

Deploy Rails app to digitalocean with nginx, unicorn, capistrano & postgres

Create Droplet

Create droplet of your liking (ubuntu 12.04 x32) Use an xx.04 LTS version

Setup DNS

On Digital Ocean, create a DNS entry for your server (xyz.com)

Make sure it has NS records that use digital oceans nameservers

# need to be run as root
# Add NewRelic repo
wget -O - https://download.newrelic.com/548C16BF.gpg | sudo apt-key add -
# sure the new repo on the list
# /etc/apt/sources.list.d/newrelic.list and set it to contain the line:
deb http://apt.newrelic.com/debian/ newrelic non-free
@jentanbernardus
jentanbernardus / README.md
Created April 7, 2016 12:29 — forked from jonathantneal/README.md
Local SSL websites on Mac OSX

Local SSL websites on Mac OSX

These instructions will guide you through the process of setting up local, trusted websites on your own computer.

These instructions are intended to be used on Mac OSX Yosemite.

NOTE: You may substitute the edit command for nano, vim, or whatever the editor of your choice is. Personally, I forward edit to Sublime Text:

alias edit="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
<?php
class CWS_Jetpack_Modules {
function __construct() {
add_filter( 'option_jetpack_active_modules', array( $this, 'active_modules' ) );
}
function active_modules( $modules ) {
$allowed_modules = array(
'enhanced-distribution',
@jentanbernardus
jentanbernardus / nginx.conf
Created March 31, 2016 02:48 — forked from markjaquith/nginx.conf
My WordPress Nginx setup
upstream phpfpm {
server unix:/var/run/php5-fpm.sock;
}
upstream hhvm {
server unix:/var/run/hhvm/hhvm.sock;
}
# SSL
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
# Install dependencies
#
# * checkinstall: package the .deb
# * libpcre3, libpcre3-dev: required for HTTP rewrite module
# * zlib1g zlib1g-dbg zlib1g-dev: required for HTTP gzip module
apt-get install checkinstall libpcre3 libpcre3-dev zlib1g zlib1g-dbg zlib1g-dev && \
mkdir -p ~/sources/ && \
# Compile against OpenSSL to enable NPN