Skip to content

Instantly share code, notes, and snippets.

Gordon Franke gimler

Block or report user

Report or block gimler

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
gimler /
Created Jul 4, 2018
Simple bash script to find files where the class name not match the file name
find tests -name '*Test.php' -exec sh -c 'FILEPATH={}; FILE=${FILEPATH##*/}; FILEBASE=${FILE%.php}; if ! grep -q $FILEBASE $FILEPATH; then echo $FILEPATH \($FILEBASE\); fi' \;
View gist:7020118
$ export VAGRANT_LOG=debug; vagrant up ubuntu
INFO global: Vagrant version: 1.3.5
DEBUG global: Loading core plugin: C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/box/plugin.rb
INFO manager: Registered plugin: box command
DEBUG global: Loading core plugin: C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/destroy/plugin.rb
INFO manager: Registered plugin: destroy command
DEBUG global: Loading core plugin: C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/halt/plugin.rb
INFO manager: Registered plugin: halt command
DEBUG global: Loading core plugin: C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/help/plugin.rb
INFO manager: Registered plugin: help command
View gist:5290246

We are testing a simple controller from imaginable MVC framework.

class UserController extends AbtractController {

    public function show($id)
        $user = $this->db->find('users',$id);
        if (!$user) return $this->render404('User not found');
View ACLHelper.php
namespace WSL\BaseBundle\Util\Helper;
use Doctrine\ORM\Query;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Security\Acl\Permission\MaskBuilder;
* Description of ACL
View memcached
#! /bin/bash
# Provides: memcached
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: memcached - Memory caching daemon
gimler / symfony1_find_missing_translation_strings.php
Created Aug 10, 2010
Find mising translations string for all or a given language in a symfony1 i18n folder.
View symfony1_find_missing_translation_strings.php
$pathToTranslationXMLFiles = 'lib/symfony/plugins/sfDoctrinePlugin/i18n';
// config null for all languages or a specific language e.g. de or fr
$myLang = null;
if (isset($argv[1]))
$myLang = $argv[1];
echo 'Use '.$myLang . PHP_EOL;
You can’t perform that action at this time.