Skip to content

Instantly share code, notes, and snippets.

Avatar

Володя vgrish

View GitHub Profile
View chmod
echo "Set permissions for /mag2.promoway1.ru/www...";
echo "CHOWN files...";
chown -R u19587:u19587 "/mag2.promoway1.ru/www";
echo "CHMOD directories...";
find "/mag2.promoway1.ru/www" -type d -exec chmod 0755 '{}' \;
echo "CHMOD files...";
find "/mag2.promoway1.ru/www" -type f -exec chmod 0644 '{}' \;
@vgrish
vgrish / getnodes.class.php
Created Mar 4, 2014
core/model/modx/processors/resource/getnodes.class.php
View getnodes.class.php
<?php
/**
* Get nodes for the resource tree
*
* @package modx
* @subpackage processors.layout.tree.resource
*/
class modResourceGetNodesProcessor extends modProcessor {
/** @var int $defaultRootId */
public $defaultRootId;
View аякс + history api.html
<h2>первый вызов</h2>
[[!AjaxSnippet?
&snippet=`pdoPage`
&element=`msProducts`
&tpl=`tpl.msProducts.row`
&limit=`3`
&depth=`1`
&parents=`4`
&showLog=`0`
@vgrish
vgrish / Hash.js
Created Mar 14, 2014
history api
View Hash.js
Hash = {
// Получаем данные из адреса
get: function() {
var vars = {}, hash, splitter, hashes;
if (!this.oldbrowser()) {
var pos = window.location.href.indexOf('?');
hashes = (pos != -1) ? decodeURIComponent(window.location.href.substr(pos + 1)) : '';
splitter = '&';
}
else {
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>вход</title>
</head>
<body>
<p>php не пашет</p>
</body>
</html>
View chmod
#!/bin/bash
echo "Set permissions for /var/www/photo-angel.kz/www...";
echo "CHOWN files...";
chown -R photo-angel:photo-angel "/var/www/photo-angel.kz/www";
echo "CHMOD directories...";
find "/var/www/photo-angel.kz/www" -type d -exec chmod 0755 '{}' \;
echo "CHMOD files...";
find "/var/www/photo-angel.kz/www" -type f -exec chmod 0644 '{}' \;
View gist:10986609
[2014-04-17 17:43:10] (ERROR @ /assets/components/msklad/1c_exchange.php) [mSklad] Ошибка загрузки изображения товара (Кроссовки EXIT 2 GTX Salomon 41189), файл (/home/v/vertical23/public_html/assets/components/msklad/1c_temp/1682dd8e2b1111e18aece06995c938e0_2b6e8a0b698411e384d2e06995c938e0.jpg) не найден
[2014-04-17 17:43:10] (ERROR @ /assets/components/msklad/1c_exchange.php) [mSklad] Ошибка загрузки изображения товара (Кроссовки EXIT 2 GTX W Salomon 41190), файл (/home/v/vertical23/public_html/assets/components/msklad/1c_temp/1682dd952b1111e18aece06995c938e0_2b6e8a0c698411e384d2e06995c938e0.jpg) не найден
[2014-04-17 17:43:10] (ERROR @ /assets/components/msklad/1c_exchange.php) [mSklad] Ошибка загрузки изображения товара (Кроссовки EXIT 2 PEAK Salomon 41191), файл (/home/v/vertical23/public_html/assets/components/msklad/1c_temp/1682dd9d2b1111e18aece06995c938e0_2b6e8a0d698411e384d2e06995c938e0.jpg) не найден
[2014-04-17 17:43:10] (ERROR @ /assets/components/msklad/1c_exchange.php) [mSklad] Ошибка загруз
@vgrish
vgrish / memcache.php
Created Apr 22, 2014
мониторинг memcache
View memcache.php
<?php
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2004 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
View crossposting-panel-send.js
Crossposting.panel.Send = function(config) {
config = config || {record:{}};
config.record = config.record || {};
Ext.applyIf(config,{
//extend: MODx.panel.Resource,
baseParams: {}
,panelXType: 'crossposting-panel-send'
,border: false
//,cls: 'modx-resource-tab'
,layout: 'form'