Skip to content

Instantly share code, notes, and snippets.

View avsej's full-sized avatar

Sergey Avseyev avsej

View GitHub Profile
@0x000000
0x000000 / gist:3852426
Created October 8, 2012 13:07
Список ссылок для RubyGardens
=== Часть 1. Обзорная информация
== Обязательно посмотрите
http://en.wikipedia.org/wiki/Internet_media_type
http://en.wikipedia.org/wiki/List_of_HTTP_status_codes или http://www.flickr.com/photos/girliemac/sets/72157628409467125
http://api.rubyonrails.org/classes/ActionDispatch/Response.html
http://api.rubyonrails.org/classes/ActionDispatch/Request.html
== Документация по AJAX в jQuery
@mnunberg
mnunberg / 6bit.c
Created August 13, 2012 08:21
couchbase flags proposals
/**
*
*/
/**
* Couchbase Datatype Flags
*
* These flags help to disambiguate the format and compression of values.
*
@avsej
avsej / git-fetch-patches.tcl
Created August 8, 2012 09:55
This script helps to avoid switching to browser to fetch fresh patchsets from gerrit
#!/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
#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)); \
@mikhailov
mikhailov / 0. nginx_setup.sh
Last active June 6, 2025 19:19
NGINX+SPDY with Unicorn. True Zero-Downtime unless migrations. Best practices.
# 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)
#
@avsej
avsej / .tclshrc
Created July 5, 2012 09:24
My .tclshrc
# 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
@davidjrice
davidjrice / README.md
Created June 14, 2012 21:53
New Relic Instrumentation for Couchbase Ruby
  • 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!

Couchbase New Relic Instrumentation

@davidjrice
davidjrice / README.md
Created June 6, 2012 17:00
Vagrantfile for an Ubuntu lucid 32 or 64 bit VM with couchbase 2.0.0.dp4.1

Install Virtualbox

wget http://download.virtualbox.org/virtualbox/4.1.16/VirtualBox-4.1.16-78094-OSX.dmg
open VirtualBox-4.1.16-78094-OSX.dmg
# double click .pkg to install

Install vagrant

gem install vagrant --no-ri --no-rdoc
@avsej
avsej / .xinitrc
Created May 10, 2012 10:42
.xinitrc
#!/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 &
@avsej
avsej / .tmux.conf
Created May 10, 2012 06:26
My .tmux.conf
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