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". |
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) |