* Version: 1.0
* Date: 2012-09-18
* Author: Pádraic <padraic.brady.at.gmail.com>
* Status: Under Discussion
* First Published at: http://wiki.php.net/rfc/escaper
<?php | |
namespace Common\Service; | |
use Doctrine\ORM\EntityManager; | |
use DoctrineModule\Service\AbstractFactory; | |
use Zend\ServiceManager\ServiceLocatorInterface; | |
class EntityManagerFactory extends AbstractFactory | |
{ |
<?php | |
namespace Mockizart\Bundle\BlogBundle\Controller; | |
use Mockizart\Bundle\BlogBundle\MockizartBlogBundle; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
use Mockizart\Bundle\BlogBundle\Entity\MockblogTag; | |
use Mockizart\Bundle\BlogBundle\Form\MockblogTagType; |
* Version: 1.0
* Date: 2012-09-18
* Author: Pádraic <padraic.brady.at.gmail.com>
* Status: Under Discussion
* First Published at: http://wiki.php.net/rfc/escaper
// Refer to: | |
// https://gist.github.com/remy/350433 | |
// https://gist.github.com/jarrodirwin/0ce4c0888336b533b2c4 | |
try { | |
// Test webstorage existence. | |
if (!window.localStorage || !window.sessionStorage) throw "exception"; | |
// Test webstorage accessibility - Needed for Safari private browsing. | |
localStorage.setItem('storage_test', 1); | |
localStorage.removeItem('storage_test'); |
tests | |
composer.lock | |
composer.phar | |
vendor |
/* The MIT License (MIT) | |
* Copyright (c) 2012 Carl Eriksson | |
* | |
* Permission is hereby granted, free of charge, to any person obtaininga | |
* copy of this software and associated documentation files (the "Software"), | |
* to deal in the Software without restriction,including without limitation | |
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
* and/or sell copies of the Software, and to permit persons to whom the Software | |
* is furnished to do so, subject to the following conditions: | |
* |
<?php | |
/** | |
* This is a quick example of how to stream a file to a client, likely a browser, | |
* using Zend Expressive. There are a lot of factors which it doesn't take in to | |
* account. But for the purposes of a quick intro, this should suffice. | |
*/ | |
class ViewDocumentPageAction | |
{ | |
protected function downloadFile() | |
{ |
// this is now a module: | |
// https://github.com/WebReflection/backtick-template#es2015-backticks-for-es3-engines-- | |
var template = require('backtick-template'); | |
// just string | |
const info = 'template'; | |
`some ${info}` === template('some ${info}', {info}); |
#!/bin/bash | |
echo "\n\n--- Killing Stupid Adobe Auto Load Crap ---\n\n" | |
launchctl unload -w /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist | |
launchctl unload -w /Library/LaunchAgents/com.adobe.AAM.Updater-1.0.plist | |
echo "\n\n--- Done! ---\n\n" |
var timeoutId = 0; | |
var timeouts = {}; | |
var worker = new Worker("/static/timeout-worker.js"); | |
worker.addEventListener("message", function(evt) { | |
var data = evt.data, | |
id = data.id, | |
fn = timeouts[id].fn, | |
args = timeouts[id].args; |