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 | |
if ($modx->event->name == 'OnDocFormSave') { | |
if(isset($_POST['adress']) AND isset($_POST['phone']) ){ | |
$sellUSD = floatval($_POST['sellUSD']); | |
$buyUSD = floatval($_POST['buyUSD']); | |
$buyEUR = floatval($_POST['buyEUR']); | |
$buyUAN = floatval($_POST['buyUAN']); | |
$buyRUB = floatval($_POST['buyRUB']); |
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
upstream backend-site {server unix:/var/run/php5-site.sock;} | |
server { | |
server_name www.site.ru; | |
return 301 http://site.ru$request_uri; | |
} | |
server { | |
listen 80; | |
client_max_body_size 32m; | |
error_log /var/www/user/site.ru/logs/error.log; |
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
[site.ru] | |
listen = /var/run/php5-site.sock | |
listen.mode = 0666 | |
user = user | |
group = user | |
chdir = /var/www/user/site.ru/www | |
php_admin_value[upload_tmp_dir] = /var/www/user/tmp | |
php_admin_value[soap.wsdl_cache_dir] = /var/www/user/tmp | |
php_admin_value[date.timezone] = Europe/Moscow | |
# тут значения можно поменять, в зависимости от нагрузки на сайт |
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
#include <windows.h> | |
#include "ntdll.h" | |
#define __DEBUG__ 1000 | |
#define patternlen MAX_PATH*2 |
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
В этом мануале мы попробуем настроить связку nginx и php-fpm, так чтобы она могла работать на бесплатном тарифе. В уме мы держим, что в результате на этом сервере будет бежать drupal (весьма требовательный к ресурсам движок), но настройки подойдут и для массы других cms. | |
Надо сказать, что львиная доля этого how-to — это перепечатка (естественно с согласия авторов) статьи на [url=http://nixclub.pro/node/31]nixclub.pro[/url] Евгения Верещагина и Александра Кубашина, поскольку они написали, ну буквально про нас и написали хорошо. | |
Перед началом рекомендуем минимально настроить сервер с помощью [url=http://forum.serverscamp.com/viewtopic.php?f=14&t=202]этого[/url] руководства. | |
Далее текст перепечатки: | |
0.0 Введение (или зачем эта статья) | |
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
#!/bin/bash | |
# MySQL root password | |
ROOTPASS='password' | |
TIMEZONE='Europe/Moscow' | |
MYSQLPASS=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c12` | |
SFTPPASS=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c12` | |
PASSWORD=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c12` | |
############## |
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
#!/bin/bash | |
# MySQL root password | |
ROOTPASS='password' | |
TIMEZONE='Europe/Moscow' | |
MYSQLPASS=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c12` | |
SFTPPASS=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c12` | |
PASSWORD=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c12` | |
############## |
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
ALTER TABLE `modx_ms2_ingredient_remains` DROP PRIMARY KEY; | |
ALTER TABLE `modx_ms2_ingredient_remains` ADD `id` int(10) unsigned AUTO_INCREMENT primary key; |
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
<? | |
public function getSelfCost($ingredientId, $stockId) | |
{ | |
$pdo = $this->modx->getService('pdoFetch'); | |
$pdo->setConfig(array( | |
'class' => 'msInventoryIngredientInfo', | |
'innerJoin' => array( | |
'msInventoryIngredient' => array( | |
'class' => 'msInventoryIngredient', | |
'on' => 'msInventoryIngredient.invent_id = msInventoryIngredientInfo.invent_id' |
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
import { defaults, get } from 'lodash' | |
import axios from 'axios' | |
import store from '../store/store' | |
import def from './default' | |
export const connection = (options = {}) => { | |
if (store.getters.getToken) { | |
def.headers = {Authorization: store.getters.getToken} | |
} | |
const instance = axios.create(defaults(def, options)) |
OlderNewer