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 () { | |
var vars = []; | |
var reserved = [ | |
'$', | |
'jQuery', | |
'History', | |
'Ext', | |
'CKEDITOR', | |
'applicationCache', | |
'caches', |
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 | |
use Imagine\Image\ImageInterface; | |
use Monolog\Logger; | |
use Monolog\Handler\StreamHandler; | |
set_time_limit(60*10); | |
require 'vendor/autoload.php'; |
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
// layout for only 2 columns | |
function layout (container, selector) { | |
var ct = container.jquery ? container : $(container); | |
var themes = ct.find(selector); | |
var colLeft = 0; | |
var colRight = 0; | |
// resize and position `.theme` elements | |
themes.each (function (idx) { | |
var elm = $(this); |
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
$('.img-responsive').wrap('<div style="display: table-cell" />').parent().wrap('<div style=" display: table;table-layout: fixed;width: 100%;" />'); |
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
var div = document.createElement('div'); | |
function escapeHtml(unsafe) { | |
div.innerText = unsafe; | |
return div.innerHTML; | |
} |
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 | |
/** | |
* Based on https://gist.github.com/tovic/d7b310dea3b33e4732c0 | |
*/ | |
class Minify | |
{ | |
public function minifyHtml($html, $processJs = true, $processCss = true) | |
{ | |
$html = trim($html); |
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
var maxId = setTimeout(function(){}, 0); | |
for(var i=0; i < maxId; i+=1) { | |
clearTimeout(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 | |
namespace App\Providers; | |
use Pimple\Container; | |
use Pimple\ServiceProviderInterface; | |
use JMS\Serializer\SerializerBuilder; | |
use Doctrine\Common\Annotations\AnnotationRegistry; | |
use JMS\Serializer\SerializationContext; |
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 | |
namespace App\Providers; | |
use Pimple\Container; | |
use Pimple\ServiceProviderInterface; | |
use Doctrine\ORM\Tools\Setup; | |
use Doctrine\ORM\EntityManager; | |
use Doctrine\ORM\Mapping\Driver\AnnotationDriver; | |
use Doctrine\Common\Annotations\AnnotationReader; |
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
gulp.task('js', function () { | |
var browserify = require('browserify'); | |
var source = require('vinyl-source-stream'); | |
var buffer = require('vinyl-buffer'); | |
return browserify('./public/js/app.js').bundle() | |
.pipe(source('app.js')) | |
.pipe(buffer()) | |
.pipe($.ngAnnotate({single_quotes: true, add: true})) | |
.pipe($.if(argv.min, $.uglify())) |