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
# File: etc/default/docker | |
# Use DOCKER_OPTS to modify the daemon startup options. | |
#DOCKER_OPTS="" | |
DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4 -H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock" |
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
# Install Requrements | |
apt-get install curl libxslt1-dev libreadline6-dev libmcrypt-dev libicu-dev g++ \ | |
libcurl4-openssl-dev libssl-dev clibcurl4-openssl-dev pkg-config libssl-dev libsslcommon2-dev \ | |
pkg-config libcurl3 autoconf libmagickwand-dev libmagickcore-dev | |
# Install PHPBrew (https://github.com/phpbrew/phpbrew) | |
curl -L -O https://github.com/phpbrew/phpbrew/raw/master/phpbrew; chmod +x phpbrew | |
sudo mv phpbrew /usr/local/bin/phpbrew | |
######################## |
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 | |
/* | |
* This file is part of the MyJobCompany platform. | |
* | |
* © MyJobCompany https://myjob.company | |
*/ | |
namespace tests\AppBundle\Controller; |
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 | |
FILE=$1 | |
OUTPUTFILE=$2 | |
TEMPDIR=`mktemp -d` | |
gs -q -dSAFER -dBATCH -dNOPAUSE -sDEVICE=jpeg -dJPEGQ=95 -r600 -o $TEMPDIR/out-%05d.jpg $FILE | |
SIZES=(`identify -format "%W-%H\n" $FILE`) |
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
function isJpeg($string) { | |
if(ord($string[0]) != 0xFF) { | |
return false; | |
} | |
if(ord($string[1]) != 0xD8) { | |
return false; | |
} | |
$count = strlen($string); |
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 | |
# Script to convert PDF - create flatten PDF file | |
# | |
# Format: | |
# ./convert input-file.pdf output-file.pdf |
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 | |
/** | |
* This file is part of the MnumiPrint package. | |
* | |
* (c) Mnumi Sp. z o.o. <[email protected]> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |
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 | |
public function validateKey($value) | |
{ | |
$key_parts = explode(' ', $value, 3); | |
if (count($key_parts) < 2) { | |
return false; | |
} |
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
/* | |
* Formatter for Selenium 2 / WebDriver PHP client. | |
*/ | |
var subScriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader); | |
subScriptLoader.loadSubScript('chrome://selenium-ide/content/formats/webdriver.js', this); | |
function useSeparateEqualsForArray() { | |
return true; | |
} |
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 | |
// Inside your action | |
$this->serializer = new \Symfony\Component\Serializer\Serializer(); | |
$this->serializer->addNormalizer(new \Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer()); | |
$this->serializer->setEncoder('xml', new \Symfony\Component\Serializer\Encoder\XmlEncoder()); | |
return $this->createResponse($this->serializer->encode($page, 'xml'), 200, array('Content-Type' => 'application/xml')); |