Skip to content

Instantly share code, notes, and snippets.

View igormx's full-sized avatar

Carlos Nacianceno igormx

  • Monterrey, México
View GitHub Profile
@igormx
igormx / Mongo.php
Created August 17, 2012 12:52
mongodb class layout
<?php
// Start of mongo v.1.1.4
class Mongo {
const DEFAULT_HOST = "localhost";
const DEFAULT_PORT = 27017;
const VERSION = "1.1.4";
public $connected;
@igormx
igormx / arrayFuncs.php
Created August 17, 2012 19:26
Array Flip Reverse Range
<?php
$rango=range(5, 1);
$flipper=array_flip($rango);
$reverse=array_reverse($rango);
var_dump($rango);
var_dump($flipper);
var_dump($reverse);
@igormx
igormx / init_autoloader.php
Created October 29, 2012 18:54
Registring a namespace with the autoloader in ZF2
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
/**
Plugins Managers, Service Manager and Service Locator: solving the confusion.
Goal: Clarify the confusion between the Service Locator pattern and the ZF2's Service Manager implementations including the plugin managers.
1.- I will talk about the Service Locator pattern, what it is, what kind of problems it solves,(perhaps talking a bit about what a service is).
2.- Later, i will explain the ZF2's Service Manager implementation, how to configure it, how to use it, how to avoid some common mistakes
3.-Finally, i will talk about the plugin managers,how they are some kind of clones of the Service Manager but its purpose is just to serve one kind of service,and i will emphasize on the benefits of using them and ofcourse that they have some minor traps.
+5 años de experiencia:
- Dominio de al menos 1 lenguaje scripting (PHP, Python, Ruby)
- Manejo de Framework MVC (Zend,Symfony,Laravel, RoR, Django)
- Design Patterns
- Bases de Datos Relacionales (MSSQL, Oracle, MySQL)
- Base de datos No Relacioales (MongoDB, Redis, CouchDB)
- Inglés Fluído
Desable
array(3) {
[0]=>
array(15) {
[0]=>
int(1)
[1]=>
int(2)
[2]=>
int(3)
[3]=>
<?php
/**
* This code is missing:
* -a way to inject the dependecy for Motor
* -a way to accept multiple kinds of Motors as a dependecy
**/
class Coche
{
/**
* @var Motor
@igormx
igormx / install.sh
Created May 31, 2019 13:46 — forked from ziadoz/install.sh
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`
# [1,5,948,139,3,11] ---> [11,3,139,948,5,1]
@igormx
igormx / Book
Created December 13, 2021 19:31
Bookshelf
<?php
class Book implements ItemInterface
{
/**
* @var string
*/
private string $title;
/**