Skip to content

Instantly share code, notes, and snippets.

@Longpc
Longpc / rainbows.production.conf
Created September 19, 2017 06:39 — forked from glebm/rainbows.production.conf
Example Rainbows Config
# -*- encoding : utf-8 -*-
#= Rainbows HTTP server (on unix socket!)
#== Rainbows can be used to manage multiple forked workers in a specified concurrency-IO model
# Set working directory for Capistrano
# pwd -L keeps symlinks
working_directory `pwd -L`.chomp
# Listen through a unix socket
@Longpc
Longpc / nginx.default.conf
Created September 19, 2017 02:37 — forked from sumardi/nginx.default.conf
Install PHP-FPM, Nginx & MySQL on EC2 with Amazon Linux AMI
# Install linux update, followed by GCC and Make
sudo yum -y update
sudo yum install -y gcc make
# Install Nginx and PHP-FPM
sudo yum install -y nginx php-fpm
# Install PHP extensions
sudo yum install -y php-devel php-mysql php-pdo \
php-pear php-mbstring php-cli php-odbc \
@Longpc
Longpc / rails_admin_approve_review.rb
Created January 20, 2017 06:38 — forked from marinalohova/rails_admin_approve_review.rb
Custom action for RailsAdmin
require 'rails_admin/config/actions'
require 'rails_admin/config/actions/base'
module RailsAdminApproveReview
end
module RailsAdmin
module Config
module Actions
class ApproveReview < RailsAdmin::Config::Actions::Base
@Longpc
Longpc / singleton.cpp
Last active August 29, 2015 14:18 — forked from solkar/singleton.cpp
#include "GameManager.h"
using namespace cocos2d;
static GameManager *_sharedGameManager = NULL;
GameManager* GameManager::getInstance()
{
if (! _sharedGameManager)
{