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/env bash | |
# TODO: EXPERIMENTAL run command by command as it will spit errors! | |
# ERRRORS: php-xdebug not working for php 7.2 yet! | |
if [ $EUID -ne 0 ]; then | |
exec sudo $0 | |
fi | |
systemctl stop apache2 |
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
<?php | |
/** | |
* Process all apache *.log.gz access logs in current directory | |
* - split data by domain (first field in access log) | |
*/ | |
if (!is_dir('out')) { | |
mkdir('out'); | |
} |
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
<?php | |
/** | |
* @example Run as `php ping.php` | |
* | |
* Ping and keep pinging every 5 seconds. | |
* | |
* Print out only the errored packets | |
*/ |
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
; DO NOT EDIT THIS FILE - put everything into server.ini | |
; AND CHECK tailf /var/log/hhvm/error. | |
; php options | |
session.save_handler = files | |
session.save_path = /var/lib/hhvm/sessions | |
session.gc_maxlifetime = 1440 | |
; hhvm specific. | |
hhvm.log.level = Verbose |
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
<?php | |
function getSupervisorAllProcessInfo(): string | |
{ | |
$xml = '"<?xml version="1.0" encoding="utf-8"?>' . | |
'<methodCall><methodName>supervisor.getAllProcessInfo</methodName><params/></methodCall>"'; | |
$req = "POST /RPC2 HTTP/1.0\r\nContent-Type: text/xml\r\nContent-Length: " . strlen($xml) . "\r\n\r\n$xml"; | |
$s = stream_socket_client('unix:///var/run/supervisor.sock', $errNo, $errStr); |
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
/** | |
* Get Amazon ASIN by SKU | |
* | |
* @param string $sku | |
* @return string Amazon ASIN | |
* @link http://docs.developer.amazonservices.com/en_UK/products/Products_GetMatchingProductForId.html | |
*/ | |
public function getAsinBySku($sku) | |
{ | |
// append the real SKU ending |
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
<?php | |
/** | |
* Updated behaviour: | |
* | |
* - search also /controllers and /Controller folders | |
* - disregard adminhtml.xml setup, write 'return true' always - or comment it back in if you need it | |
* - write more verbose logs | |
* - only update controllers extending Mage_Adminhtml_Controller_Action | |
* | |
* |
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
<?php | |
// @author standa | 2013-09-28 | get the return terms | |
// 1. load the model and get the page id | |
$this->load->model('catalog/information'); | |
// here the page_id is the setting from the Admin / Settings / Default Shop / Options | |
$page_id = $this->config->get('config_return_id') | |
// 2. get the the row from the information database |
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
/** | |
* This should replace .co.uk ebay links with the links based on the current hostname | |
* | |
* @author standa aardvark | |
* @version 2015-12-15 | |
* | |
* Obfuscate via https://javascriptobfuscator.com/Javascript-Obfuscator.aspx | |
*/ | |
(function () { | |
if (location.host.indexOf('.co.uk') == -1) { |