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
location / { | |
try_files $uri $uri/ @rewr; | |
} | |
location @rewr { | |
rewrite ^([\w\d]+)/?$ /index.php?module=$1 break; | |
rewrite ^([\w\d]+)/([^/]+)/?$ index.php?module=$1&do=$2 break; | |
rewrite ^([\w\d]+)/([^/]+)/([^/]+)/?$ index.php?module=$1&do=$2&type=$3 break; | |
} |
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 | |
## не имеет большого смысла. классический шелл (или что его в системе заменяет не даёт никакой существенной экономии, только лишь проёбы производительности из-за того что в баше большинство важных команд являются встроенными, а в шелле - нет) | |
#cleanup 2 | |
#Root needed | |
LOG_DIR=/var/log | |
ROOT_UID=0 # Only root had $UID 0 | |
LINES=50 # Number of strings we save | |
E_XCD=66 # We cannot enter to the dir? | |
E_NOTROOT=67 # Not a root |
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
while getopts ":c::i::f::m::e::t::w:h" opt; do | |
case $opt in | |
f) FILE="$OPTARG" ;; | |
m) MSG="$OPTARG" ;; | |
e) EXIT="$OPTARG" ;; | |
t) TYPE="$OPTARG" ;; | |
w) ERR_LIMIT_W="$OPTARG" ;; | |
c) ERR_LIMIT_C="$OPTARG" ;; | |
i) INTERVAL="$OPTARG" ;; | |
h) usage; exit 0 ;; |
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
following order of precedence: | |
exact name | |
longest wildcard name starting with an asterisk, e.g. “*.example.org” | |
longest wildcard name ending with an asterisk, e.g. “mail.*” | |
first matching regular expression (in order of appearance in a configuration file) |
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
--- tarantool-1.4.8+64+gcf66a7b+20130314+2251.orig/test/unit/objc_catchcxx.m | |
+++ tarantool-1.4.8+64+gcf66a7b+20130314+2251/test/unit/objc_catchcxx.m | |
@@ -8,7 +8,7 @@ int main() | |
luaL_openlibs(L); | |
@try { | |
luaL_error(L, "test"); | |
- } @catch (...) { | |
+ } @catch (id allOthers) { | |
printf("exception handled\n"); | |
} |
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
30 3 * * * ionice -c3 nice -n 10 /usr/local/bin/upload-backup | |
0 3 * * * nice -n 10 /usr/local/bin/davclean.py | |
0 4 * * * ionice -c3 find /home/backup -type f -mtime +30 -delete | |
0 5 * * * ionice -c3 nice -n 10 /usr/bin/python -W ignore::DeprecationWarning /usr/bin/rdiff-backup /home/user/www/files/ 10.10.1.2::/rdiffbackup/upload/ | |
0 */2 * * * kill -USR1 `pidof tarantool_box` |
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
root@server:~# for i in {1..8} ; do dd if=/dev/zero of=disk$i bs=8M count=1 ; do ne | |
1+0 записей считано | |
1+0 записей написано | |
скопировано 8388608 байт (8,4 MB), 0,030612 c, 274 MB/c | |
1+0 записей считано | |
1+0 записей написано | |
скопировано 8388608 байт (8,4 MB), 0,043387 c, 193 MB/c | |
1+0 записей считано | |
1+0 записей написано | |
скопировано 8388608 байт (8,4 MB), 0,0478381 c, 175 MB/c |
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/python | |
my_dict = { | |
'key1': 'value1', | |
'key2': 0, | |
'key3': 'value3' | |
} | |
print my_dict |
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
v.yarmak@v-yarmak:~$ sudo -s | |
[sudo] password for v.yarmak: | |
root@v-yarmak:/home/vlad# apt-get install apt-file | |
Чтение списков пакетов… Готово | |
Построение дерева зависимостей | |
Чтение информации о состоянии… Готово | |
Уже установлена самая новая версия apt-file. | |
обновлено 0, установлено 0 новых пакетов, для удаления отмечено 0 пакетов, и 4 пакетов не обновлено. | |
root@v-yarmak:/home/vlad# apt-file update | |
Downloading Index http://mirror.yandex.ru/debian/dists/wheezy/main/Contents-amd64.diff/Index: |
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
def checkio(data): | |
#Your code here | |
#It's main function. Don't remove this function | |
#It's using for auto-testing and must return a result for check. | |
#replace this for solution | |
sorted_pairs = sorted(enumerate(data),None,lambda (index, element): element) | |
count = len(data) | |
if count == 1: | |
return [] |
OlderNewer