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
# app/config/config.yml | |
# The part that saved me was: | |
# 1: My quotes didn't wrap every header type in allow_headers | |
# 2: hosts: has to be set to the domain making the request. | |
nelmio_cors: | |
defaults: | |
allow_credentials: true | |
allow_origin: ['*'] |
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
App.config(function($httpProvider) { | |
var logsOutUserOn401 = function($location, $q, SessionService) { | |
var success = function(response) { | |
return response; | |
}; | |
var error = function(response) { | |
if(response.status === 401) { | |
SessionService.unset('authenticated'); | |
$location.path('/login'); |
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
<div class="row" ng-file-drop> | |
<div class="col-md-6 col-lg-6"> | |
<h3>Select files</h3> | |
<div ng-show="uploader.isHTML5"> | |
<!-- Example: ng-file-drop | ng-file-drop="options" --> | |
<div class="marketing img-drop-zone" ng-file-drop="{ url: '/foo' }" ng-file-over="img-hover"> | |
<span class="icon ion-image icon-bg"></span> |
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
/** | |
* Dvd | |
* | |
* @ORM\Table(name="dvd") | |
* @ORM\Entity | |
*/ | |
class Dvd | |
{ | |
/** | |
* @var integer |
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\LaravelExtensions; | |
use Illuminate\Queue\QueueServiceProvider; | |
class MyQueueServiceProvider extends QueueServiceProvider { | |
/** | |
* Register the connectors on the queue manager. | |
* | |
* @param \Illuminate\Queue\QueueManager $manager |
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
#!/bin/sh | |
# check for where the latest version of IDEA is installed | |
IDEA=`ls -1d /Applications/IntelliJ\ * | tail -n1` | |
wd=`pwd` | |
# were we given a directory? | |
if [ -d "$1" ]; then | |
# echo "checking for things in the working dir given" | |
wd=`ls -1d "$1" | head -n1` |
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
. | |
├── actions | |
├── stores | |
├── views | |
│ ├── Anonymous | |
│ │ ├── __tests__ | |
│ │ ├── views | |
│ │ │ ├── Home | |
│ │ │ │ ├── __tests__ | |
│ │ │ │ └── Handler.js |
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
#!/bin/bash -xv | |
# Initialize Amazon Linux AMI 2015.09 for PHP7 Web Application | |
# yum | |
# update default | |
sudo yum upgrade --enablerepo="*" -y | |
# install php | |
for i in $(seq 3) | |
do | |
[ ! -s remi-release-6.rpm ] && curl --connect-timeout 3 http://remi.kazukioishi.net/enterprise/remi-release-6.rpm > remi-release-6.rpm |
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
# Install linux update, followed by GCC and Make | |
sudo yum -y update | |
sudo yum install -y gcc make | |
# Install Nginx and PHP-FPM | |
sudo yum install -y nginx php-fpm | |
# Install PHP extensions | |
sudo yum install -y php-devel php-mysql php-pdo \ | |
php-pear php-mbstring php-cli php-odbc \ |
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
###### | |
# Author: Marcello de Sales ([email protected]) | |
# Description: Create Create Environment Variables in EC2 Hosts from EC2 Host Tags | |
# | |
### Requirements: | |
# * Install jq library (sudo apt-get install -y jq) | |
# * Install the EC2 Instance Metadata Query Tool (http://aws.amazon.com/code/1825) | |
# | |
### Installation: | |
# * Add the Policy EC2:DescribeTags to a User |
OlderNewer