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
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# Every Vagrant virtual environment requires a box to build off of. | |
config.vm.box = "precise64" | |
config.vm.provision :shell, :path => "config/vagrant-bootstrap.sh" | |
# Create a forwarded port mapping. | |
config.vm.network :forwarded_port, guest: 8000, host: 8000, auto_correct: true |
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
# Deployment remotes | |
set :stages, %w(production staging) | |
set :default_stage, 'staging' | |
require 'capistrano/ext/multistage' | |
# Repo options | |
set :application, 'MajorAuth' | |
set :repository, 'git@github.com:brightmarch/major-auth.git' | |
set :scm, :git |
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
load 'deploy' | |
Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } | |
load 'config/deploy' | |
namespace :deploy do | |
task :install_composer, :roles => :web do | |
run "curl -s https://getcomposer.org/installer | php -- --install-dir=#{latest_release}" | |
end |
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
*filter | |
# Allows all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0 | |
-A INPUT -i lo -j ACCEPT | |
-A INPUT ! -i lo -d 127.0.0.0/8 -j REJECT | |
# Accepts all established inbound connections | |
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT | |
# Allows all outbound traffic |
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
server { | |
listen 80; | |
server_name majorauth.com www.majorauth.com; | |
return 301 https://majorauth.com$request_uri; | |
} | |
server { | |
listen 443; | |
server_name majorauth.com; |
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
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
sendfile on; |
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
server { | |
listen 80; | |
server_name example.com example.net example.org www.example.com www.example.net www.example.org; | |
# If the Host header begins with www. | |
# then strip off the www. and redirect | |
# to the URL without the www. prefix. | |
if ($host ~* ^www\.(.+)) { | |
return 301 $scheme://$1$request_uri; | |
} |
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 | |
class AuthenticationControllerTest | |
{ | |
public function testAccountCanNotAccessAdministration() | |
{ | |
$client = static::createClient(); | |
$crawler = $client->request('GET', '/authentication/sign-in'); | |
$container = $client->getKernel() |
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 | |
BOOKSRC=AWA-PHP.md | |
BOOKPDF=AWA-PHP.pdf | |
BOOKHTML=AWA-PHP.html | |
pandoc $BOOKSRC -o $BOOKHTML | |
prince --verbose --media=print $BOOKHTML -o $BOOKPDF |
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
db_settings.host=localhost | |
db_settings.database=major_auth | |
db_settings.username=major_auth | |
db_settings.password= | |
db_settings_test.host=localhost | |
db_settings_test.database=major_auth_test | |
db_settings_test.username=major_auth_test | |
db_settings_test.password= |