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
#import "UISplitViewControllerDelegateService.h" | |
#import "NoteViewController.h" | |
@interface UISplitViewControllerDelegateService () <UISplitViewControllerDelegate> | |
@end | |
@implementation UISplitViewControllerDelegateService | |
- (id)initWithSplitViewController:(UISplitViewController *)controller { |
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
--- | |
- name: Launch new instances | |
local_action: | |
module: ec2 | |
aws_access_key: "{{ aws_access_key }}" | |
aws_secret_key: "{{ aws_secret_key }}" | |
region: "{{ ec2_region }}" | |
keypair: "{{ ec2_keypair }}" | |
group: "{{ ec2_group }}" |
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
import javax.swing.*; | |
import java.awt.event.*; | |
import java.awt.*; | |
import java.io.*; | |
import java.net.*; | |
import javax.swing.event.*; | |
public class Internet extends JFrame | |
{ | |
final JDesktopPane theDesktop; |
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
$.ajax('login', { | |
success: function (response) { | |
var csrf = $('<div/>').append(response).find('input[name="_csrf_token"]').val(); | |
if (!csrf) { | |
throw 'Failed to parse CSRF value'; | |
} | |
$.ajax('login_check', { | |
type: "POST", |
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
$(document).ajaxError(function (e, xhr, settings, exception) { | |
var STATUS_CODE_UNAUTHORIZED = 401, | |
STATUS_CODE_FORBIDDEN = 403; | |
// If we don't have a valid session, show a login form | |
if (xhr.status === STATUS_CODE_UNAUTHORIZED || xhr.status === STATUS_CODE_FORBIDDEN) { | |
showLoginForm(); | |
} | |
}); |
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\DemoBundle\Handler; | |
use Symfony\Component\Security\Http\Authentication\DefaultAuthenticationFailureHandler; | |
use Symfony\Component\Security\Core\Exception\AuthenticationException; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpFoundation\JsonResponse; | |
class XHRAuthenticationFailureHandler extends DefaultAuthenticationFailureHandler |
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\Bundle\AppBundle\Form\EventListener; | |
use Symfony\Component\Form\Event\DataEvent; | |
use Symfony\Component\Form\FormFactoryInterface; | |
use Symfony\Component\EventDispatcher\EventSubscriberInterface; | |
use Symfony\Component\Form\FormEvents; | |
class IsAdminFieldSubscriber implements EventSubscriberInterface |
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
cd ~ | |
sudo yum update | |
sudo yum install java-1.7.0-openjdk -y | |
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.11.tar.gz -O elasticsearch.tar.gz | |
tar -xf elasticsearch.tar.gz | |
rm elasticsearch.tar.gz | |
mv elasticsearch-* elasticsearch | |
sudo mv elasticsearch /usr/local/share |
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
{ | |
"name": "symfony/framework-standard-edition", | |
"autoload": { | |
"psr-0": { "": "src/" } | |
}, | |
"require": { | |
"php": ">=5.3.2", | |
"symfony/symfony": "2.1.*", | |
"doctrine/orm": "2.2.*", | |
"doctrine/doctrine-bundle": "dev-master", |