This file contains 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
## | |
# Instalacion pathogen | |
mkdir -p ~/.vim/autoload ~/.vim/bundle && \ | |
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim | |
echo "execute pathogen#infect()" >> ~/.vimrc | |
## | |
# Instalacion de plugines del nerdtee |
This file contains 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
/** | |
* Uso un logger de Doctrine nulo, para evitar problemas de uso de memoria | |
* @see http://stackoverflow.com/questions/9699185/memory-leaks-symfony2-doctrine2-exceed-memory-limit | |
* @var Psr\Log\LoggerInterface | |
*/ | |
$oldLogger = $this->em->getConnection()->getConfiguration()->getSQLLogger(); | |
$this->em->getConnection()->getConfiguration()->setSQLLogger(null); | |
This file contains 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
FROM ruby:2.3.1 | |
RUN apt-get update -qq && apt-get install -y \ | |
build-essential \ | |
libpq-dev \ | |
&& rm -rf /var/lib/apt/lists/* | |
RUN gem install bundler | |
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash \ |
This file contains 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
@logger: Psr\Log\LoggerInterface | |
@templating: Symfony\Component\Templating\EngineInterface | |
@doctrine.orm.entity_manager: Doctrine\ORM\EntityManagerInterface # implementa todas las funciones DQL | |
@doctrine.orm.entity_manager: Doctrine\Common\Persistence\ObjectManager # implementa las funciones de persistencia | |
@cache.app: Psr\Cache\CacheItemPoolInterface | |
@security.token_storage: Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface | |
@security.authorization_checker: Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface | |
@security.access.decision_manager: Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface | |
@translator: Symfony\Component\Translation\TranslatorInterface; | |
@router: Symfony\Component\Routing\RouterInterface ó Symfony\Component\Routing\Generator\UrlGeneratorInterface |
This file contains 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
vendor/* |
This file contains 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 | |
# src/AppBundle/Command/TestMailCommand.php | |
namespace AppBundle\Command; | |
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; | |
use Symfony\Component\Console\Input\InputArgument; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Input\InputOption; | |
use Symfony\Component\Console\Output\OutputInterface; |
This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <net/if.h> | |
void main(int argc,char** argv) |
This file contains 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
class iimysqli_result | |
{ | |
public $stmt, $nCols, $field; | |
public function fetch_array() | |
{ | |
$ret = array(); | |
$code = "return mysqli_stmt_bind_result(\$this->stmt "; | |
for ($i=0; $i<$this->nCols; $i++) |
This file contains 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 verifyEmail($toemail, $fromemail, $getdetails = false){ | |
$email_arr = explode("@", $toemail); | |
$domain = array_slice($email_arr, -1); | |
$domain = $domain[0]; | |
// Trim [ and ] from beginning and end of domain string, respectively | |
$domain = ltrim($domain, "["); | |
$domain = rtrim($domain, "]"); |
This file contains 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
#!/bin/bash | |
read -p "Enter your app name: " APP | |
if [ q$APP == q ] ; then | |
echo "No app ... aborting" | |
exit 1 | |
fi | |
rhc create-app -t diy-0.1 -a $APP | |
export APPSHOW=`rhc app-show -a $APP` |
NewerOlder