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
user www-data; | |
worker_processes 1; | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; | |
events { | |
use epoll; | |
worker_connections 1024; | |
multi_accept on; |
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
# загружаем дефолтный профиль оболочки | |
source /etc/profile | |
# Настраиваем клавиши | |
source ~/.zsh_key | |
source ~/.zsh_aliase | |
source ~/.zsh_function | |
# Use hard limits, except for a smaller stack and no core dumps | |
unlimit |
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
case $TERM in | |
linux) | |
bindkey "^[[2~" yank | |
bindkey "^[[3~" delete-char | |
bindkey "^[[5~" up-line-or-history | |
bindkey "^[[6~" down-line-or-history | |
bindkey "^[[1~" beginning-of-line | |
bindkey "^[[4~" end-of-line | |
bindkey "^[e" expand-cmd-path ## C-e for expanding path of typed command | |
bindkey "^[[A" up-line-or-search ## up arrow for back-history-search |
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
# цветной grep | |
alias grep='grep --color=auto' | |
# более человекочитаемые df и du | |
alias df='df -h' | |
alias du='du -h' | |
# переименование-перемещение c пogтвepжgeнueм без коррекции | |
alias mv='nocorrect mv -i' | |
# рекурсивное копирование с подтверждением без коррекции | |
alias cp='nocorrect cp -iR' | |
# удаление без подтверждения без коррекции |
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
precmd() { | |
[[ -t 1 ]] || return | |
case $TERM in | |
*xterm*|rxvt|(dt|k|E|a)term*) print -Pn "\e]0;[%~] %m\a" ;; | |
screen(-bce|.linux)) print -Pn "\ek[%~]\e\" && print -Pn "\e]0;[%~] %m (screen)\a" ;; #заголовок для скрина | |
esac | |
} | |
preexec() { | |
[[ -t 1 ]] || return |
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
-- Standard awesome library | |
require("awful") | |
-- Theme handling library | |
require("beautiful") | |
-- Notification library | |
require("naughty") | |
-- {{{ Variable definitions | |
-- Themes define colours, icons, and wallpapers | |
-- The default is a dark theme |
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
<html> | |
<head> | |
<title>Chat</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> | |
<script> | |
$(function () { | |
function check () { | |
$("#output").load('/update', function () { | |
setTimeout(check, 1); | |
}); |
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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl http://npmjs.org/install.sh | sh |
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
module PaginationHelper | |
# The main pagination method, you should only need to call this | |
# Returns full HTML markup for pagination links | |
def pagination(page, pages, uri) | |
html, ul = [], [] | |
html << pagination_position(page, pages) | |
if pages > 1 | |
ul << pagination_previous_link(page, uri) | |
ul << pagination_page_links(page, pages, uri) |