Javascript API

The Javascript API exposes the following methods to the global object HS.beacon. You can use them to control your Beacon programmatically, both in modal and popover mode.

.ready( )    
.open( )    
.close( )    
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/
View gist:bc39ccd8f806439d392811a934dd883a

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

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 (

Make sure it has NS records that use digital oceans nameservers

View newrelic php config
# need to be run as root
# Add NewRelic repo
wget -O - | 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 newrelic non-free

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\"
View config-example.php
# show error
define('APP_SHOW_ERROR', true);
ini_set('display_errors', (APP_SHOW_ERROR) ? 'On' : 'Off');
error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT);
define('APP_VERSION', '');
define('APP_INSTALL_HASH', '');
View cws-jetpack-modules.php
class CWS_Jetpack_Modules {
function __construct() {
add_filter( 'option_jetpack_active_modules', array( $this, 'active_modules' ) );
function active_modules( $modules ) {
$allowed_modules = array(
View nginx.conf
upstream phpfpm {
server unix:/var/run/php5-fpm.sock;
upstream hhvm {
server unix:/var/run/hhvm/hhvm.sock;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;