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
import * as React from 'react'; | |
import axios from 'axios'; | |
import isEqual from 'lodash.isequal'; | |
class Axios extends React.Component { | |
constructor(props) { | |
super(props); | |
// NOTE: Do not use this.context as React uses it internally | |
this.axiosContext = React.createContext(this.value); |
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
editor.on('load', function () { | |
// Step 1: Grab the editor element | |
var editorDoc = editor.getElement('editor'); | |
// Step 2: Create the script tag | |
var script = editorDoc.createElement('script'); | |
script.type = 'text/javascript'; | |
script.innerHTML = "(function() {var config = {kitId: '<yourKitID>'}; var d = false; var tk = document.createElement('script'); tk.src = '//use.typekit.net/' + config.kitId + '.js'; tk.type = 'text/javascript'; tk.async = 'true'; tk.onload = tk.onreadystatechange = function() {var rs = this.readyState; if (d || rs && rs != 'complete' && rs != 'loaded') return; d = true; try { Typekit.load(config); } catch (e) {} }; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(tk, s); })();"; | |
// Step 3: Add it to the editor's <head> |
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
SetEnvIfNoCase Host domain2\.co\.uk SYMFONY__DOMAIN__NAME=domain2 |
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 | |
// app/AppKernel.php | |
public function registerContainerConfiguration(LoaderInterface $loader) | |
{ | |
$envParameters = $this->getEnvParameters(); | |
if (@$envParameters['domain.name'] == 'domain2') { | |
$loader->load(__DIR__.'/config/domain2/config_'.$this->getEnvironment().'.yml'); | |
} else { |
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
{ | |
"name": "friendsofsymfony/twitter-bundle", | |
"type": "symfony-bundle", | |
"description": "Symfony FOSTwitterBundle", | |
"keywords": ["Twitter authentication"], | |
"homepage": "http://friendsofsymfony.github.com", | |
"license": "MIT", | |
"authors": [ | |
{ | |
"name": "FriendsOfSymfony Community", |
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
parameters: | |
pdo.options: [] | |
pdo.db_options: | |
db_table: session | |
services: | |
session.storage.pdo: | |
class: Symfony\Component\HttpFoundation\SessionStorage\PdoSessionStorage | |
arguments: | |
- @doctrine.dbal.default.wrapped_connection |
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
CREATE TABLE `session` ( | |
`sess_id` varchar(255) NOT NULL, | |
`sess_data` text NOT NULL, | |
`sess_time` int(11) NOT NULL, | |
PRIMARY KEY (`sess_id`), | |
UNIQUE KEY `sess_id_idx` (`sess_id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
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
framework: | |
#... | |
session: | |
default_locale: %locale% | |
lifetime: 3600 | |
auto_start: true | |
storage_id: session.storage.pdo | |
#... | |
parameters: |
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 Flock\MainBundle\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
use Flock\MainBundle\Form\EventForm; | |
use Flock\MainBundle\Entity\Event; | |
class DefaultController extends 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
if (!$this->container->hasDefinition($parent = $definition->getParent())) { | |
if ($definition->isAbstract()) { | |
return null; | |
} | |
throw new \RuntimeException(sprintf('The parent definition "%s" defined for definition "%s" does not exist.', $parent, $id)); | |
} |
NewerOlder