Skip to content

Instantly share code, notes, and snippets.

@syabruk
syabruk / sshc.sh
Created November 3, 2012 22:59
Manage ssh connection information
#!/bin/bash
SSHC_PATH=$HOME'/.sshc'
if [ ! -d $SSHC_PATH ] ; then
mkdir "$SSHC_PATH"
fi
case "$1" in
-a | --add)
touching_name="$2"
@syabruk
syabruk / template.rb
Created January 15, 2013 16:48 — forked from route/template.rb
class Example < ActiveRecord::Base
## included modules & attr_*
## associations
## plugins
## named_scopes
## validations
## callbacks
## class methods
## public methods
## protected methods
@syabruk
syabruk / 0. nginx_setup.sh
Last active August 29, 2015 14:27 — forked from mikhailov/0. nginx_setup.sh
Nginx + secure pseudo-streaming
# Nginx can serve FLV/MP4 files by pseudo-streaming way without any specific media-server software.
# To do the custom build we use 2 modules: --with-http_secure_link_module --with-http_flv_module
# This module "secure-link" helps you to protect links from stealing away.
#
# NOTE: see more details at coderwall: http://coderwall.com/p/3hksyg
cd /usr/src
wget http://nginx.org/download/nginx-1.5.13.tar.gz
tar xzvf ./nginx-1.5.13.tar.gz && rm -f ./nginx-1.5.13.tar.gz
@syabruk
syabruk / 0. nginx_setup.sh
Last active August 29, 2015 14:27 — forked from mikhailov/0. nginx_setup.sh
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)
#