View gist:5208665
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 domain; | |
root /paht/to/public/; | |
index index.php; | |
location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ { | |
access_log off; | |
expires max; |
View server.php
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 | |
$uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); | |
$uri = urldecode($uri); | |
$web = true; | |
$paths = require __DIR__.'/paths.php'; |
View gist:5394508
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 { | |
server_name domain.dev; | |
listen 80; | |
root /path/to/web; | |
index app_dev.php; | |
try_files $uri $uri/ /app_dev.php?$query_string; | |
location ~ \.php$ { | |
include fastcgi.conf; |
View phpunit.xml.dist
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
<?xml version="1.0" encoding="UTF-8"?> | |
<phpunit backupGlobals="false" | |
backupStaticAttributes="false" | |
colors="true" | |
convertErrorsToExceptions="true" | |
convertNoticesToExceptions="true" | |
convertWarningsToExceptions="true" | |
processIsolation="false" | |
stopOnFailure="false" |
View security.yml
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
services: | |
my_host.firewall.request_matcher: | |
class: Symfony\Component\HttpFoundation\RequestMatcher | |
arguments: ["/", "www\.host\.eu"] | |
security: | |
firewalls: | |
my_firewall: | |
request_matcher: site.my_firewall.request_matcher |
View phpspec.yml
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
suites: | |
main: | |
namespace: "" | |
src_path: "foo" |
View post-checkout
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
#!/usr/bin/env php | |
<?php | |
exec("git diff --name-only {$argv[1]} {$argv[2]}", $changedFiles); | |
$filesAction = array( | |
'composer.lock' => 'composer install', | |
'package.json' => 'npm install', | |
'bower.json' => 'bower install', | |
); |
View cvm
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
#!/usr/bin/env sh | |
if [[ -z "$1" ]]; then | |
echo "You must chose an action [list, use]" | |
exit | |
fi | |
cd ~/repositories/cakephp/cakephp/ | |
git fetch > /dev/null |
View pre-push
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 | |
git stash >/dev/null | |
# if tests fail, do not push | |
exit_with_status() { | |
git pop >/dev/null | |
exit "$1" |
View score.rb
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
# encoding: UTF-8 | |
class Score | |
attr_accessor :rolls | |
def initialize(rolls) | |
@rolls = rolls.each_char | |
end |
OlderNewer