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
# API ACCESS | |
* Access Point: http://affiliatex.com/api | |
* All fields must be passed in POST variables; GET variables will be ignored. | |
* You will have to retrieve a secret key in order to use AffiliateX API. | |
# API RESPONSE FORMAT | |
The response will be always JSON-encoded. |
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
<?php | |
namespace _\integrations; | |
use _\Curl; | |
use _\lang\Arr; | |
use _\lang\Lazy; | |
use RuntimeException; |
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
<?php | |
namespace _\lang; | |
use ReflectionFunction; | |
use RuntimeException; | |
/** | |
* Trait Lazy | |
* |
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
<?php | |
/** | |
* Class Router is static class which serves for routing purposes and can be used in 2 modes: full-map and on-the-go. | |
* | |
* Reads request uri path from $_GET['_REQUEST_URI'] | |
*/ | |
namespace _\web; |
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
function ActiveActsBranch() | |
{ | |
// { actTypes: ..., searchTree: ... } | |
var meta = null | |
this.load = function(callback) | |
{ | |
if (typeof activeActsBranchTimestamp !== "undefined" && activeActsBranchTimestamp && $.jStorage.storageAvailable()) | |
{ | |
var savedTimestamp = $.jStorage.get('activeActsBranchTimestamp', null) |
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
function AjaxItems($container, config) { | |
var defaultOpts = { | |
textNoItems: "Не знайдено", | |
removalActionClass: "actionRemove", | |
removalDialog: function(el) { return confirm('Видалити?') }, | |
showNoItems: function($container, message) { | |
$container.empty().append( $div().text(message) ) | |
}, | |
// If you want item removal to be handled, add an element with class .actionRemove (or another specified in removalActionClass option) | |
itemDom: function(el) { |
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
# Global restrictions configuration file. | |
# Designed to be included in any server {} block. | |
location = /favicon.ico { | |
log_not_found off; | |
access_log off; | |
} | |
location = /robots.txt { | |
allow all; | |
log_not_found off; |
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
# WordPress single blog rules. | |
# Designed to be included in any server {} block. | |
index index.php; | |
# This order might seem weird - this is attempted to match last if rules below fail. | |
# http://wiki.nginx.org/HttpCoreModule | |
location / { | |
try_files $uri $uri/ /index.php?q=$uri&$args; | |
} |
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
# WWW HTTP -> non-WWW | |
server { | |
listen 80; | |
server_name www.example.com; | |
return 301 $scheme://example.com$request_uri; | |
} | |
server { | |
listen 80; |
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
# Add locale to the list of generated locales | |
echo ru_RU.UTF-8 UTF-8 >> /var/lib/locales/supported.d/local | |
# Regenerate list (it will invoke locale-gen...) | |
dpkg-reconfigure locales | |
# Set default passwords for mysql | |
# TODO: Setting blank password does not work (?) | |
debconf-set-selections <<< 'mysql-server mysql-server/root_password password' | |
debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password' |