This file contains hidden or 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
sudo apt-get -y install curl git-core python-software-properties build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev libcurl4-openssl-dev | |
http://www.modrails.com/documentation/Users%20guide%20Nginx%204.0.html | |
http://alexpearce.me/2012/06/setting-up-a-vps/ | |
https://raw.github.com/alexpearce/templates/master/nginx.app.conf |
This file contains hidden or 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
openssl req -engine gost -newkey gost2001 -pkeyopt paramset:A -passout pass:11111111 -subj "/C=RU/ST=Moscow/L=Moscow/O=foo_bar/OU=foo_bar/CN=developer/[email protected]" -keyout private.key.pem -out csr.csr | |
openssl x509 -engine gost -req -days 365 -in csr.csr -signkey private.key.pem -out crt.crt | |
openssl x509 -engine gost -inform pem -in crt.crt -pubkey -noout > public.key.pem | |
openssl dgst -engine gost -hex -sign private.key.pem message.xml | |
openssl smime -engine gost -sign -inkey private.key.pem -signer crt.crt -in message.xml |
This file contains hidden or 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
- if @act_record_deaths.empty? | |
%h2 Ничего не найдено | |
- else | |
%table.statements-table.table.table-striped.table-bordered.table-condensed | |
%thead | |
%tr | |
%th= "Дата записи акта" | |
%th= "Номер записи акта" |
This file contains hidden or 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
# Capistrano configuration | |
# | |
# require 'new_relic/recipes' - Newrelic notification about deployment | |
# require 'capistrano/ext/multistage' - We use 2 deployment environment: staging and production. | |
# set :deploy_via, :remote_cache - fetch only latest changes during deployment | |
# set :normalize_asset_timestamps - no need to touch (date modification) every assets | |
# "deploy:web:disable" - traditional maintenance page (during DB migrations deployment) | |
# task :restart - Unicorn with preload_app should be reloaded by USR2+QUIT signals, not HUP |
This file contains hidden or 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
def ApplicationController | |
def blah | |
@meme.drop! | |
end | |
end | |
class FooController < ApplicationController |
This file contains hidden or 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/local/bin/ruby | |
module DocSorter | |
extend self | |
require 'ap' | |
DOC = %w{doc docx xls odt xlsx dwg txt cdr psd ppt eml csv log xslic} | |
CODE = %w{yml sql mht htm html php rb diff conf} | |
PDF = %w{pdf} | |
GRAPH = %w{tiff jpg jpeg bmp gif png} | |
ARH = %w{zip rar 7z gz tgz bz2 bz exe jnlp msi apk xpi gem ipsw} |
This file contains hidden or 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/local/bin/ruby | |
require 'ap' | |
DOCS = %w{doc docx odt xls} | |
SCANS = %w{pdf tiff jpg jpeg bmp} | |
ARCHS = %w{zip rar 7z gz tgz bz2 bz} | |
MUZ = %w{mp3 wav flac} | |
dowsdir = '/home/achernikov/Downloads' | |
docs = [] | |
archs = [] |
This file contains hidden or 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
user www-data; | |
worker_processes 8; | |
error_log /var/log/nginx/error.log; | |
pid /opt/nginx/logs/nginx.pid; | |
events { | |
worker_connections 1024; | |
multi_accept on; | |
use epoll; |
This file contains hidden or 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
class Post < ActiveRecord::Base | |
end |
This file contains hidden or 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
$file_mode = 'w' | |
$file_path = 'file.tmp' | |
$lines = [] | |
def generate_lines | |
for i in 0..999 | |
$lines << ("0".."z").to_a.sample((10..20).to_a.sample).join('') | |
end | |
end |