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
hhvm.server.file_socket = /var/run/hhvm/hhvm.sock |
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
#!/usr/bin/python | |
# use it with argument - url to sitemap, e.g. http://example.com/sitemap.xml | |
# it just prints out errors, use > fielname.log to logging into the file | |
try: | |
from urllib2 import urlopen, Request, HTTPError, URLError | |
except ImportError: | |
from urllib.request import urlopen, Request, HTTPError, URLError | |
import signal | |
import threading |
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
По статье https://habrahabr.ru/post/182676/ | |
только чтобы дешифрованный файл прошивки получить надо смонтировать из ком. строки из под админа системный диск mount /s X: там будет файл | |
прошивки с расширением bin (у меня это было 01818.bin) далее все как в статье. Грузимся с флешки предварительно установив в bios Legacy | |
Boot режим, загрузились ... выставили нужные опции и убрали Legacy режим. | |
Для получения списка опций только вместо 11 пункта и далее используем Universal EFI Extractor из этой статьи | |
https://habrahabr.ru/post/211879/ (у меня и с перловым скриптом получилось, но только на сервере запустить, на винде не получилось | |
нормально дамп сделать а Universal EFI Extractor на винде работает хорошо). |
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
https://github.com/1487quantum/ard-projects/tree/master/rgbstrip_sk6812 |
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 | |
#if you have difficulties with permissions just run in root of magento dir | |
#default permissions gets from var/cache or index.php else use arg like owner:group | |
path="index.php" | |
if [ -z $1 ]; then | |
if [ -d "var/cache" ]; then | |
path="var/cache" | |
fi | |
perm=$(stat -c "%U:%G" $path) | |
else |
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
diff -rupN mage_org/app/code/core/Mage/Catalog/Model/Url.php src_shop/app/code/core/Mage/Catalog/Model/Url.php | |
--- mage_org/app/code/core/Mage/Catalog/Model/Url.php 2013-11-19 00:48:25.679009391 +0100 | |
+++ src_shop/app/code/core/Mage/Catalog/Model/Url.php 2013-11-19 00:49:24.188005601 +0100 | |
@@ -643,13 +643,24 @@ class Mage_Catalog_Model_Url | |
$this->_rewrite = $rewrite; | |
return $requestPath; | |
} | |
+ | |
+ // avoid unnecessary creation of new url_keys for duplicate url keys | |
+ $noSuffixPath = substr($requestPath, 0, -(strlen($suffix))); |
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
diff -rupN src_org/app/code/core/Mage/SalesRule/Model/Rule/Condition/Product/Subselect.php src_patched/app/code/core/Mage/SalesRule/Model/Rule/Condition/Product/Subselect.php | |
--- src_org/app/code/core/Mage/SalesRule/Model/Rule/Condition/Product/Subselect.php 2016-02-17 19:27:54.000000000 +0100 | |
+++ src_patched/app/code/core/Mage/SalesRule/Model/Rule/Condition/Product/Subselect.php 2017-05-04 16:36:44.349301447 +0200 | |
@@ -114,7 +114,7 @@ class Mage_SalesRule_Model_Rule_Conditio | |
$attr = $this->getAttribute(); | |
$total = 0; | |
foreach ($object->getQuote()->getAllVisibleItems() as $item) { | |
- if (parent::validate($item)) { | |
+ if (Mage_Rule_Model_Condition_Combine::validate($item)) { | |
$total += $item->getData($attr); |
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
1. Дано: увлажнитель 220В | |
Цель: включать/выключать по влажности автоматически. | |
Решение: запихнуть в сетевой фильтр или какой нибудь удлинитель или розетку с вилкой, в общем чтобы был конечный внешний вид. | |
Примечание: sonoff + am2301, есть приложение и сценарии, по-моему самое то | |
2. Дано: Есть щиток, есть генератор | |
Цель: удаленно заглушить бензогенератор. | |
Задача: обрывать цепь реле (предполагается реле + nRF24L01+) и через минуту возвращать, но генератор уже будет заглушен. | |
3. Дано: погреб |
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
Sauce: https://community.magento.com/t5/Technical-Issues/Cookies-frontend-cid-is-never-renewed-compared-to-frontend-one/td-p/41077 | |
The core code seems to have forgotten to include the logic to renew the frontend_cid cookie. | |
I have contacted Magento support regarding this and they provided me a patch - SUPEE-7136, however I'm not seeing it published online anywhere... | |
The issue lies in this file: | |
app/code/core/Mage/Core/Model/Session/Abstract/Varien.php | |
What the patch does is replace this: |
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/bash | |
USER=user | |
PASS=pass | |
DBNAME=dbname | |
BKP_PATH=/backups | |
PATH=/var/www/site/data/www | |
mysqldump -u${USER} -p --lock-tables=false --single-transaction --quick --hex-blob --routines --triggers ${DBNAME} | gzip > ${DBNAME}_(DATE).sql.gz & | |
tar -C ${PATH} -zcpf ${BKP_PATH}/${DBNAME}.tgz ./ |
OlderNewer