Skip to content

Instantly share code, notes, and snippets.

Luis Cordova cordoval

Block or report user

Report or block cordoval

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am cordoval on github.
  • I am cordoval (https://keybase.io/cordoval) on keybase.
  • I have a public key ASBZeLM1EAhwJs9O_Rm-RS0WjBFZp7f0liKWL9ufT4RMogo

To claim this, I am signing this object:

@cordoval
cordoval / gist:f2f1890100c8c6d89a8540b1e2c658df
Created Oct 25, 2017 — forked from giannisp/gist:ebaca117ac9e44231421f04e7796d5ca
Upgrade PostgreSQL 9.6.5 to 10.0 using Homebrew (macOS)
View gist:f2f1890100c8c6d89a8540b1e2c658df
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work.
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0."
Database files have to be updated before starting the server, here are the steps that had to be followed:
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default
brew unlink postgresql
brew install postgresql@9.6
brew unlink postgresql@9.6
brew link postgresql
View test.sh
kubectl create -f test.yaml
#secret "postgres-files-secret" created
#statefulset "postgres-statefulset" created
kubectl exec -it postgres-statefulset-0 /bin/sh
ls -lah /var/lib/postgresql/
# total 12
# drwxr-xr-x 3 root root 4.0K May 19 16:02 .
# drwxr-xr-x 3 root root 4.0K May 19 16:02 ..
View gist:82a0f43a4c2dd1073b79
<?php
/**
* sfValidatorZip validates a zip code.
*
* @author Brent Shaffer <bshafs@gmail.com>
*/
class sfValidatorZip extends sfValidatorRegex
{
View FormFieldManager
class FormFieldManager
{
/**
* Recria fields com rebra de bloqueio.
*
* @param FormInterface $sourceForm
* @param FormInterface $child
*/
public function rebuildChild(FormInterface $sourceForm, FormInterface $child)
{
View ShortArraySyntaxFixer.php
use Symfony\CS\FixerInterface;
use Symfony\CS\Tokens;
class ShortArraySyntaxFixer implements FixerInterface
{
public function fix(\SplFileInfo $file, $content)
{
$tokens = Tokens::fromCode($content);
for ($index = 0, $c = $tokens->count(); $index < $c; $index++) {
@cordoval
cordoval / .gitignore
Last active Aug 29, 2015
Starting with components
View VagrantXDebug.md

Configure

xdebug.ini

xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_port=9000
xdebug.remote_autostart=1
xdebug.remote_connect_back=1
View changelog.php
<?php
$token = '<yourtoken>';
// Find latest version
exec('git tag', $tags, $return);
usort($tags, 'version_compare');
$latest = array_pop($tags);
// Get commits since latest version
exec('git log ' . $latest . '...HEAD --oneline', $commits, $return);
View CommandContext.php
<?php
namespace MFB\Behat\Subcontext;
use Behat\Gherkin\Node\PyStringNode;
use Behat\MinkExtension\Context\RawMinkContext;
use Symfony\Component\Console\Tester\CommandTester;
use Symfony\Component\EventDispatcher\EventDispatcher;
/**
You can’t perform that action at this time.