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 | |
# setfacl script for Web hosting | |
root=/mnt/data | |
admin_group=admin | |
users_group=devs | |
www_user=www-data | |
# Clear all acls | |
sudo setfacl -R -b $root/{environments,repositories,common} |
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 | |
/** | |
* PHP script to replace site url in Wordpress database dump, even with WPML | |
* @link https://gist.github.com/lavoiesl/2227920 | |
*/ | |
if (!empty($argv[1]) && $argv[1] == 'update') { | |
$file = file_get_contents('https://gist.github.com/lavoiesl/2227920/raw/wordpress-change-url.php'); | |
if ($file === false) { |
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 | |
# Export some ENV variables so you don’t have to type anything | |
export AWS_ACCESS_KEY_ID='my-key-id' | |
export AWS_SECRET_ACCESS_KEY='my-secret' | |
export PASSPHRASE='my-gpg-key-passphrase' | |
GPG_KEY='my-gpg-pub-id' | |
# The source of your backup | |
SOURCE=/ |
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 | |
# Use credentials in /etc/mysql/debian.cnf to export MySQL database | |
database="$1" | |
shift | |
options="$@" | |
if [[ -z "$database" ]]; then | |
echo "Usage: $0 database [options]" >&2 | |
exit 2 |
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
<VirtualHost *:80> | |
ServerAdmin {USER}@cslavoie.com | |
ServerName {DOMAIN} | |
ServerAlias www.{DOMAIN} | |
ServerAlias {USER}.localhost | |
ServerAlias {USER}.static.cslavoie.com | |
DocumentRoot {DOC_ROOT} | |
<Directory {DOC_ROOT}> |
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
# VirtualHost Alias detection in .htaccess | |
# https://gist.github.com/2721888 | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# Neat trick to rewrite with or without leading slash | |
# Works by checking if DOCUMENT_ROOT + REQUEST_URI == REQUEST_FILENAME | |
# If not, it is because you are in a virtual host alias and DOCUMENT_ROOT is not reliable | |
# Example when alias is active: |
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 | |
# | |
# Script to remove temporary and junk files from Windows and OS X | |
# | |
### Not set up to run as root. Advised not to do this. ### | |
#### Variables #### | |
# Files to remove (Add others, just remember to increment the |
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
$ brew doctor | |
Error: /Library/Frameworks/Mono.framework detected | |
This can be picked up by CMake's build system and likely cause the build to | |
fail. You may need to move this file out of the way to compile CMake. |
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
$ gcc -v | |
Using built-in specs. | |
Target: i686-apple-darwin11 | |
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.9~22/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.9~22/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1 | |
Thread model: posix | |
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00) | |
$ clang -v |
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 Acme\DemoBundle\Tests\Controller; | |
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | |
class ContactControllerTest extends WebTestCase | |
{ | |
public function testContact() { |
OlderNewer