~ docker run -d -ti --name=xenophon ubuntu:14.04 /bin/bash
~ docker attach xenophonroot@bdb791349df9:~# sudo apt-get update| # log / debug | |
| $filename = $this->api_json . 'debug.txt'; | |
| $fp = fopen($filename, 'w'); | |
| fwrite($fp, "\n\n------- スタート " . $debug['date_start'] . " ----------\n\n"); | |
| //fwrite($fp, print_r($result, true)); | |
| fwrite($fp, "\n\n------- 終わり " . $debug['date_end'] . " ----------\n\n"); | |
| fclose($fp); | |
| echo "end\n"; |
| function stackTrace() { | |
| $stack = debug_backtrace(); | |
| $output = ''; | |
| $stackLen = count($stack); | |
| for ($i = 1; $i < $stackLen; $i++) { | |
| $entry = $stack[$i]; | |
| $func = $entry['function'] . '('; | |
| $argsLen = count($entry['args']); |
| SET @entityid = 5; -- category's ID | |
| -- Select varchar/string based category attribute values | |
| SELECT ea.attribute_id, ea.attribute_code, eav.value AS 'value', 'varchar' AS 'type' | |
| FROM catalog_category_entity e | |
| JOIN catalog_category_entity_varchar eav ON e.entity_id = eav.entity_id | |
| JOIN eav_attribute ea ON eav.attribute_id = ea.attribute_id | |
| WHERE e.entity_id = @entityid | |
| -- Select integer based category attribute values (includes boolean values) | |
| UNION( |
| #include <libssh/libssh.h> | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <errno.h> | |
| #include <string.h> | |
| int verify_knownhost (ssh_session session) { | |
| int state, hlen; | |
| unsigned char *hash = NULL; |
| <?php | |
| $req = Mage::app()->getRequest(); | |
| error_log(sprintf( | |
| "\nRequest: %s\nFull Action Name: %s_%s_%s\nHandles:\n\t%s\nUpdate XML:\n%s", | |
| $req->getRouteName(), | |
| $req->getRequestedRouteName(), //full action name 1/3 | |
| $req->getRequestedControllerName(), //full action name 2/3 | |
| $req->getRequestedActionName(), //full action name 3/3 | |
| implode("\n\t", $this->getLayout()->getUpdate()->getHandles()), | |
| $this->getLayout()->getUpdate()->asString() |
| defmodule HttpRequester do | |
| use GenServer | |
| def start_link(_) do | |
| GenServer.start_link(__MODULE__, nil, []) | |
| end | |
| def fetch(server, url) do | |
| # Don't use cast: http://blog.elixirsips.com/2014/07/16/errata-dont-use-cast-in-a-poolboy-transaction/ | |
| timeout_ms = 10_000 |
devicemapper is garbage, switch to aufs.
list images ...
$ docker ps -a
| <?php | |
| class Gauge { | |
| static $_sizes = ['B','kB','MB','GB','TB','PB','EB','ZB','YB']; | |
| static $_short = ['%dh%dm%ds', '%sm%ds', '%ds']; | |
| static $_time = [ | |
| '%d second', '%d seconds', '%d minute, ', '%d minutes', '%d hour, ', '%d hours' | |
| ]; |