- Install & Setup New Relic
cd my_rails_project/config/initializers
wget http://raw.github.com/gist/2933202/5adcf11839c0ef2064a5f0c6e0fe795d9ed2c60a/couchbase_new_relic_instrumentation.rb
git add
and deploy as usual!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
*/ | |
/** | |
* Couchbase Datatype Flags | |
* | |
* These flags help to disambiguate the format and compression of values. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env tclsh | |
# GistID: 3293907 | |
# | |
# USAGE: | |
# | |
# 1. put somewhere in the PATH | |
# 2. ensure that repository has remote with name 'gerrit' | |
# 3. execute 'git fetch-patches' | |
package require json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define pp_ev_allow_revent(l, e, revt_) \ | |
if ( ( (e)->events & revt_) != revt_ ) { \ | |
ev_io_stop(l, (e)); \ | |
ev_io_set( (e), (e)->fd, (e)->events | revt_); \ | |
ev_io_start(l, (e)); \ | |
} | |
#define pp_ev_ignore_revent(l, e, revt_) \ | |
if ((e)->events & revt_) { \ | |
ev_io_stop(l, (e)); \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Nginx+Unicorn best-practices congifuration guide. Heartbleed fixed. | |
# We use latest stable nginx with fresh **openssl**, **zlib** and **pcre** dependencies. | |
# Some extra handy modules to use: --with-http_stub_status_module --with-http_gzip_static_module | |
# | |
# Deployment structure | |
# | |
# SERVER: | |
# /etc/init.d/nginx (1. nginx) | |
# /home/app/public_html/app_production/current (Capistrano directory) | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim:ft=tcl: | |
# GistID: 3052537 | |
# | |
# apt-get install tcl-signal | |
if {$tcl_interactive} { | |
package require Signal | |
signal add SIGINT {} | |
if [info exists env(DISPLAY)] { | |
set env(TERM) xterm-color |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
xset -b # disable bell | |
eval `/usr/bin/ssh-agent` | |
urxvtd & | |
wmname LG3D | |
GSDPID=`pidof gnome-settings-daemon` | |
if [ "x$GSDPID" == "x" ]; then | |
gnome-settings-daemon & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unbind C-b | |
set -g prefix C-t | |
### KEY BINDINGS | |
# first unbind, then bind: this allows on-the-fly config reloading (with C-r) | |
# quick tip: the '-r' flag means they can be pressed repeatedly | |
# note: I only added the shortcuts I use, please "man tmux" to go beyond | |
# find a window by name | |
unbind f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream thin_cluster { | |
server unix:/var/run/thin.0.sock; | |
server unix:/var/run/thin.1.sock; | |
server unix:/var/run/thin.2.sock; | |
} | |
server { | |
server_name squish.demo.couchbase.com; | |
root /home/couchbase/couchbase-squish/public; |