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
# based on http://uberblo.gs/2011/06/high-performance-url-shortening-with-redis-backed-nginx | |
# using code from http://stackoverflow.com/questions/3554315/lua-base-converter | |
# fixes: use adresses with args, and adresses to way out site. example: /shorten/www.bn.ru/?test=shorten | |
# "database scheme" | |
# database 5: id ~> url (use 0 is not good idea) | |
# database 1: id ~> hits | |
# database 2: id ~> [{referer|user_agent}] | |
# database 3: id ~> hits (when id is not found) | |
# database 4: id ~> [{referer|user_agent}] (when id is not found) |
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 /aaa/ { | |
# internal; | |
set $upstream ""; | |
set $referer ""; | |
set $ref $arg_ref; | |
set $url $arg_url; | |
set $tohost ""; | |
set $newuri ""; | |
# add_header Content-Type text/plain; |
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 | |
######################################### | |
# Percona XtraBackup automate script | |
# Evgeny Kulev / [email protected] | |
# Write and test on FreeBSD 9.x | |
######################################### | |
PERCONADIRS="/var/mysql" | |
mkdir -p ${PERCONADIRS} | |
MAXDIRS=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
#!/bin/sh | |
# | |
# PROVIDE: mysql | |
# REQUIRE: LOGIN | |
# KEYWORD: shutdown | |
# | |
# Add the following lines to /etc/rc.conf to enable mysqlmulti: | |
# | |
# mysqlmulti_enable (bool): Set it to "YES" to enable uwsgi | |
# Default is "NO". |