Skip to content

Instantly share code, notes, and snippets.

View krolow's full-sized avatar

Vinícius Krolow krolow

View GitHub Profile
@krolow
krolow / docker-solution-unresposive-insecure-endpoint.md
Created September 22, 2015 12:33
docker.errors.DockerException: HTTPS endpoint unresponsive and insecure mode isn't enabled.

Docker compose error docker.errors.DockerException: HTTPS endpoint unresponsive and insecure mode isn't enabled.

$ docker-compose pull --allow-insecure-ssl

--allow-insecure-ssl

@krolow
krolow / AppModel.php
Created January 30, 2012 01:58
AppModel.php for CakePHP projects
<?php
App::uses('Model', 'Model');
class AppModel extends Model {
public $actsAs = array('Containable');
public $recursive = -1;
public function getErrors() {
return $this->validationErrors;
@krolow
krolow / docker-clean.sh
Created September 30, 2015 17:17
Docker aliases/bash
docker rm $(docker ps -aq)
@krolow
krolow / pdf.php
Created February 24, 2012 12:43
wkhtmltopdf php
<?php
var_dump(exec('xvfb-run /usr/bin/wkhtmltopdf http://google.com /var/www/yep.test.' . time()));
$test = array(
array('pipe', 'r'),
array('pipe', 'w'),
array('pipe', 'w'),
);
@krolow
krolow / FacebookCake.php
Created May 14, 2012 16:54
Facebook Cake bridge
<?php
if (!session_id()) { session_start(); }
App::import('Vendor', 'Facebook');
class FacebookCake
{
public function __construct($name = '')
{
@krolow
krolow / qa.sh
Created December 10, 2012 13:55
Quality Assurance PHP
#!/bin/bash
echo "======================================================================================="
echo "Fixing code standard"
echo "======================================================================================="
php-cs-fixer fix $PWD/src/
echo "Ok done ;)"
echo ""
echo "======================================================================================="
echo "Lets see the mess in our code"
echo "======================================================================================="
h1, h2, h3, h4, h5, h6 {
font-family: 'OfficinaSerifStd-Bold', 'Baskerville', 'Cambria', 'Constantia', 'Palatino Linotype', 'Palatino', 'Georgia', 'Times', 'Times New Roman', serif;
font-weight: bold;
color: rgb(51, 51, 51);
line-height: 30px;
}
p {
margin: 15px 0;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 14px;
@krolow
krolow / PHP_Exceptions.md
Last active December 12, 2015 04:08
PHP Exceptions

BadFunctionCallException

Exception thrown if a callback refers to an undefined function or if some arguments are missing.

BadMethodCallException

Exception thrown if a callback refers to an undefined method or if some arguments are missing.

DomainException