First, clone the repository of the project :
mkdir /tmp/project-name
git clone ...
Create a packages.json file in the root, containing the following :
| #! /bin/bash | |
| export $GITHUBURL="$1" | |
| # clean up remote branch list | |
| git fetch origin; git remote prune origin | |
| # delete all local branches except master | |
| git checkout master; git pull; git branch | while read repo; do branch=`echo "$repo" | cut -d" " -f 2`; if [ ! $branch == 'master' ]; then git branch -D $branch; fi; done; git gc |
| <?php | |
| if (in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', '::1', @$_SERVER['SERVER_ADDR']))) { | |
| apc_clear_cache('user'); | |
| apc_clear_cache('opcode'); | |
| echo json_encode(array('success' => true)); | |
| } else { | |
| die('SUPER TOP SECRET'); | |
| } |
| #!/usr/bin/env php | |
| <?php | |
| if ($argc !== 2) { | |
| print "SYNTAX :\n"; | |
| print ' ' . $argv[0] . ' <url>'; | |
| print "\n"; | |
| return 0; | |
| } |
| #!/bin/bash | |
| # First install registry_rebuild : drush dl registry_rebuild | |
| # Execute the following : | |
| for dir in */; do dir=${dir%*/}; if [ "custom" != "${dir}" -a "contrib" != "${dir}" ]; then mv ${dir} contrib/${dir}; fi; done | |
| # Run registry_rebuild and clear all caches : drush rr && drush cc all | |
| # Fingers crossed... | |
| # To update your git repo afterwards, just use : git add -u |
| # FIRST: Install Vagrant (http://www.vagrantup.com/) | |
| # and VirtualBox (https://www.virtualbox.org/) | |
| # | |
| # make sure the librarian gem is installed | |
| gem install librarian-chef | |
| # if you use rbenv you need to execute to make the librarian-chef command available: | |
| # $ rbenv rehash | |
| # checkout the sandbox from GitHub | |
| git clone https://github.com/Kunstmaan/KunstmaanSandbox.git | |
| # move into the sandbox folder |
First, clone the repository of the project :
mkdir /tmp/project-name
git clone ...
Create a packages.json file in the root, containing the following :
| parameters: | |
| database_driver: pdo_mysql | |
| database_host: localhost | |
| database_port: ~ | |
| database_name: sandbox | |
| database_user: sandbox | |
| database_password: sandbox | |
| mailer_transport: smtp | |
| mailer_host: localhost | |
| mailer_user: ~ |
| #!/usr/bin/perl | |
| # | |
| # curlmirror.pl | |
| # | |
| # Mirrors a web site by using curl to download each page. | |
| # The result is stored in a directory named "dest" by default. | |
| # Temporary files are stored in "/tmp". | |
| # | |
| # Author: [email protected] | |
| # |
| private function validateForm(Form $form, $entity, $groups = array('submission')) | |
| { | |
| $errors = $this->get('validator')->validate($entity, $groups, true, true); | |
| foreach ($errors as $error) { | |
| $propertyPath = $error->getPropertyPath(); | |
| if (strpos($propertyPath, '[') !== false || strpos($propertyPath, '.') !== false) { | |
| /** | |
| * Very dirty form field parser | |
| * | |
| * teamMember[0].role is converted to teamMember.0.role |
| <?php | |
| define('NUM_TESTS', 10); | |
| header('Content-type: text/plain'); | |
| interface FooInterface | |
| { | |
| } |