Skip to content

Instantly share code, notes, and snippets.

View gabrielef's full-sized avatar

Gabriele Formenti gabrielef

  • Cutowl Srl
  • Milan, Italy
View GitHub Profile
@betweenbrain
betweenbrain / gist:2284129
Created April 2, 2012 14:56
Git command to export only changed files between two commits
git archive --output=file.zip HEAD $(git diff --name-only SHA1 SHA2)
@oodavid
oodavid / README.md
Last active March 11, 2025 21:41 — forked from aronwoost/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@wowo
wowo / PHPUnit way to mock Doctrine2 Entity Manager.php
Created November 1, 2011 20:22
PHPUnit's way to mock Doctrine2 Entity Manager
<?php
class AbstractManagerBase extends \PHPUnit_Framework_TestCase
{
protected function getEmMock()
{
$emMock = $this->getMock('\Doctrine\ORM\EntityManager',
array('getRepository', 'getClassMetadata', 'persist', 'flush'), array(), '', false);
$emMock->expects($this->any())
->method('getRepository')
@rwoeber
rwoeber / post-commit
Created January 14, 2010 09:20
svn post-commit incremental backup to Amazon S3
#!/usr/bin/env ruby
# File : s3-post-commit.rb
# Description : A program to create svn backups using the
# Amazons S3 storage service
# Copyright : (c) 2007 Maximilian Schoefmann
# License : MIT, see the file MIT-LICENSE
# Modified : Richard Woeber
#
# Usage
# copty to svnserver:/path/to/svnrepo/hooks/post-commit and change the following constants