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
; 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 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 | |
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 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
# download speedtest python script | |
# wget https://raw.githubusercontent.com/rsvp/speedtest-linux/master/speedtest | |
# wget https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest_cli.py | |
while true; do ./speedtest --log; sleep 900; done |
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 | |
/** | |
* 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 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
/** | |
* 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) { |
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 Aardvark_Modifications_Model_Observer | |
{ | |
/** | |
* @see Ebizmarts_SagePaySuite_Model_Observer_Sales::addColumnToSalesOrderGrid() | |
* | |
* @param $observer | |
* @return mixed |
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 | |
/** | |
* Universal postcode checker helper class. | |
* | |
* This uses the most complete list of regexes we were able to find. | |
* | |
* @link http://stackoverflow.com/questions/578406/what-is-the-ultimate-postal-code-and-zip-regex | |
* | |
* @author Standa | |
* @version 2015-08-05 |
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 | |
/** @link https://github.com/google/google-api-php-client/blob/master/examples/fileupload.php */ | |
/************************************************ | |
We'll setup an empty 20MB file to upload. | |
************************************************/ | |
DEFINE("TESTFILE", 'testfile.txt'); | |
if (!file_exists(TESTFILE)) { | |
$fh = fopen(TESTFILE, 'w'); | |
fseek($fh, 1024*1024*20); | |
fwrite($fh, "!", 1); |
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
{ | |
"routes" : [ | |
{ | |
"bounds" : { | |
"northeast" : { | |
"lat" : 4.3561, | |
"lng" : 1.01389 | |
}, | |
"southwest" : { | |
"lat" : 9.293703, |
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
{% extends '@YourWhateverNameYouUseBundle/layout.html.twig' %} | |
{% block body %} | |
<button class="btn">Hello {{ name }}!</button> | |
{# example: use for regular assets somewhere deep in your javascripts #} | |
{# assets:install --env=... has to be run beforehand #} | |
<script type="text/javascript" src="{{ asset('bundles/yourwhatevernameyouusebundle/js/ckeditor/ckeditor.js') }}"></script> | |
{% endblock body %} |