Skip to content

Instantly share code, notes, and snippets.

View guilhermeblanco's full-sized avatar

Guilherme Blanco guilhermeblanco

  • Orlando, FL, USA
  • 22:16 (UTC -04:00)
View GitHub Profile
$client = new RiakClient('localhost', 8087);
$bucket = new RiakBucket($client, 'test');
/** @var RiakObject */
$object = $bucket->get('some_key');
// We added support for this:
$object = $bucket->get('some_key', RiakBucket::RETURN_HEAD);
<?php
interface Cache
{
/**
* Store an item on cache
*
* @param CacheItem $item
* @param ParameterList $parameterList
*
@guilhermeblanco
guilhermeblanco / CacheInterface.php
Last active December 19, 2015 08:19
PSR Cache proposal - draft 1
<?php
namespace Psr\Cache;
interface CacheInterface extends \IteratorAggregate
{
/**
* Retrieve the Cache Manager.
*
* @return ManagerInterface
Considering:
ruby --version
1.8.7
And this Hiera content: /var/lib/hiera/node_name.yaml
@guilhermeblanco
guilhermeblanco / cmake
Created September 15, 2013 14:14
Vagrant VM of precise64 box url: http://files.vagrantup.com/precise64.box Core: 1 RAM: 512 MB
root@hhvm:~/hiphop-php# cmake .
-- CMAKE_PREFIX_PATH was missing, proceeding anyway
-- Could NOT find LIBINOTIFY (missing: LIBINOTIFY_LIBRARY LIBINOTIFY_INCLUDE_DIR)
-- MySQL Include dir: /usr/include/mysql library dir: /usr/lib/x86_64-linux-gnu
-- MySQL client libraries: mysqlclient_r
-- Found libevent: /root/lib/libevent.so
-- Looking for evhttp_bind_socket_with_fd
-- Looking for evhttp_bind_socket_with_fd - found
-- Looking for gdImagePng in /usr/lib/x86_64-linux-gnu/libgd.so
-- Looking for gdImagePng in /usr/lib/x86_64-linux-gnu/libgd.so - found
[ 49%] Building CXX object hphp/CMakeFiles/hphp_runtime_static.dir/runtime/vm/jit/code-gen-helpers-x64.cpp.o
/root/hphp/hphp/util/data-block.h: In function 'unsigned char* HPHP::JIT::X64::emitServiceReqWork(HPHP::JIT::X64::Asm&, HPHP::Transl::TCA, bool, HPHP::JIT::SRFlags, HPHP::JIT::ServiceRequest, const ServiceReqArgVec&)':
/root/hphp/hphp/util/data-block.h:176:22: warning: '*((void*)(& maybeCc)+8).HPHP::Transl::UndoMarker::m_cb' may be used uninitialized in this function [-Wuninitialized]
/root/hphp/hphp/runtime/vm/jit/code-gen-helpers-x64.cpp:414:31: note: '*((void*)(& maybeCc)+8).HPHP::Transl::UndoMarker::m_cb' was declared here
/root/hphp/hphp/util/data-block.h:176:22: warning: '*((void*)(& maybeCc)+8).HPHP::Transl::UndoMarker::m_oldFrontier' may be used uninitialized in this function [-Wuninitialized]
/root/hphp/hphp/runtime/vm/jit/code-gen-helpers-x64.cpp:414:31: note: '*((void*)(& maybeCc)+8).HPHP::Transl::UndoMarker::m_oldFrontier' was declared here
root@hhvm:~/doctrine/annotations# ~/tools/vendor/bin/phpunit
PHPUnit 3.7.26 by Sebastian Bergmann.
Configuration read from /root/doctrine/annotations/phpunit.xml.dist
............................................................... 63 / 359 ( 17%)
............................................................... 126 / 359 ( 35%)
............................................................... 189 / 359 ( 52%)
............................................................... 252 / 359 ( 70%)
............................................................... 315 / 359 ( 87%)
root@hhvm:~/hphp# ./hphp/hhvm/hhvm --config hphp/test/zend/config.hdf -vEval.DumpBytecode=1 -vRepo.Local.Mode=-- -vRepo.Central.Path=/root/hphp/verify.hhbc -vEval.Jit=true -vEval.EnableArgsInBacktraces=true -vResourceLimit.CoreFileSize=0 --file 'hphp/test/zend/good/ext-spl/regexiterator_setflags_exception.php'
Pseudo-main at 0 (ID 0)
EH Catch for 38:54
Handle exception at 54
// line 3
0: DefCls 0
// line 14
2: DefCls 1
// line 16
@guilhermeblanco
guilhermeblanco / CacheInterface.php
Created October 14, 2013 19:13
PSR-6: Simple Cache
<?php
namespace Psr\Cache;
interface CacheInterface extends \ArrayAccess
{
/**
* Retrieve a Cache Entry.
*
* @param string $key
@guilhermeblanco
guilhermeblanco / CacheInterface.php
Last active December 25, 2015 13:08
PSR 7: Managed Cache
<?php
namespace Psr\Cache;
interface CacheInterface extends PSR6SimplifiedCacheInterface
{
/**
* Retrieve the Cache Manager.
*
* @return ManagerInterface