This file contains hidden or 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
var querystring = require("querystring"); | |
var base64ToString = function(str) { | |
return (new Buffer(str || "", "base64")).toString("ascii"); | |
}; | |
var base64UrlToString = function(str) { | |
return base64ToString( base64UrlToBase64(str) ); | |
}; |
This file contains hidden or 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
// loop through the 'paper' variable from Raphael JS and build up the JSON object describing all images and paths within it. | |
buildJSON = function(paper) { | |
var svgdata = []; | |
svgdata.push({ | |
width: 390, | |
height: 400 | |
}); | |
$.each(paper, |
This file contains hidden or 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 | |
namespace Acme\MyBundle\Service; | |
use Symfony\Component\HttpFoundation\File\File; | |
use Imagine\Image\ImagineInterface; | |
use Imagine\Image\BoxInterface; | |
use Imagine\Image\Point; | |
use Imagine\Image\Box; | |
This file contains hidden or 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 | |
namespace Application\Migrations; | |
use Symfony\Bundle\FrameworkBundle\Console\Application; | |
use Acme\MyBundle\Command\UpdateSlugsCommand; | |
use Symfony\Component\Console\Tester\CommandTester; | |
use Doctrine\DBAL\Migrations\AbstractMigration, | |
Doctrine\DBAL\Schema\Schema; | |
This file contains hidden or 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
#open ~/.zshrc with your favourite editor | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="kolo" | |
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) | |
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ |
This file contains hidden or 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 | |
include('php-kml/lib/kml.php'); | |
$jsonFile = file_get_contents("data.json"); | |
$json_a = json_decode($jsonFile, true); | |
$a = new kml_Document(); | |
$a->set_id('uid000000111'); |
This file contains hidden or 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 | |
namespace MyNamespace\CoreBundle\Test; | |
use Symfony\Bundle\FrameworkBundle\Client; | |
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as SymfonyWebTestCase; | |
use Symfony\Component\Process\Process; | |
abstract class WebTestCase extends SymfonyWebTestCase | |
{ |
This file contains hidden or 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 | |
php -dxdebug.remote_autostart=On -didekey=PHPSTORM -dremote_host=localhost $* |
This file contains hidden or 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
{ | |
"require": { | |
"symfony/dom-crawler": "*", | |
"symfony/css-selector": "*" | |
} | |
} |
This file contains hidden or 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 | |
namespace Acme\Controller; | |
class FooControllerTest extends \PHPUnit_Framework_TestCase | |
{ | |
public function testHook() | |
{ | |
$_SERVER['HTTP_HOST'] = 'localhost'; | |
$_SERVER['HTTP_USER_AGENT'] = 'Foobar Agent'; |
OlderNewer