Skip to content

Instantly share code, notes, and snippets.

View loicm's full-sized avatar

Loïc Mathaud loicm

View GitHub Profile
@loicm
loicm / gist:ac568e6cde0ca9ac18b4
Last active August 29, 2015 14:04
Get MongoId
// a Foo Object
print_r($foo);
Foo Object
(
[name] => Jon
[email] => [email protected]
[_id] => MongoId Object
(
[$id] => 53c6bed12ce99716008b456f
cat /var/log/supervisor/supervisord.log
2014-07-02 17:48:01,592 CRIT Supervisor running as root (no user in config file)
2014-07-02 17:48:01,592 WARN Included extra file "/etc/supervisor/conf.d/supervisor.conf" during parsing
2014-07-02 17:48:01,617 INFO RPC interface 'supervisor' initialized
2014-07-02 17:48:01,617 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2014-07-02 17:48:01,617 INFO supervisord started with pid 1
2014-07-02 17:48:02,621 INFO spawned: 'nginx' with pid 14
2014-07-02 17:48:02,623 INFO spawned: 'php-fpm' with pid 15
2014-07-02 17:48:02,626 INFO spawned: 'redis' with pid 16
2014-07-02 17:48:02,721 INFO exited: php-fpm (exit status 0; not expected)
@loicm
loicm / gist:6040331
Created July 19, 2013 16:05
Flash Peak with 1.1
sudo ./flash.sh
[sudo] password for loic:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
< waiting for device >
sending 'boot' (4808 KB)...
OKAY [ 0.840s]
writing 'boot'...
OKAY [ 0.869s]
finished. total time: 1.710s
// la classe de test dans app/tests/php/modules/moduleA/foo.php
namespace vendor\project\tests\units;
require_once __DIR__.'/../../mageekguy.atoum.phar';
include_once __DIR__.'/../../../../modules/moduleA/classes/foo/foo.class.php';
use mageekguy\atoum;
use vendor\project\foo;
@loicm
loicm / gist:3531809
Created August 30, 2012 16:04
git diff with --word-diff
$ git diff HEAD^ HEAD
diff --git a/foo.txt b/foo.txt
index fbe6624..1803e6a 100644
--- a/foo.txt
+++ b/foo.txt
@@ -1 +1 @@
-Ceci est une poule.
+Ceci est un poulet.