Skip to content

Instantly share code, notes, and snippets.


Alfred Bez alfredbez

View GitHub Profile
alfredbez / Intercept.php
Last active Dec 29, 2021
Testing stdout output with PHPUnit
View Intercept.php
class Intercept extends \php_user_filter
public static $cache = '';
public function filter($in, $out, &$consumed, $closing)
while ($bucket = stream_bucket_make_writeable($in)) {
self::$cache .= $bucket->data;
$consumed += $bucket->datalen;
alfredbez /
Created Jun 15, 2020
Dumps a oxid database without the views
# Replace DBUSER & DBNAME before running this
mysqldump \
-p \
--lock-tables=false \
$(mysql \
-p \
alfredbez /
Last active May 28, 2020
OXID error: Table 'oxid.oxv_oxshops_0' doesn't exist


This error is logged in oxideshop.log:

Base table or view not found: 1146 Table 'oxid.oxv_oxshops_0' doesn't exist at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:42, Doctrine\\DBAL\\Driver\\PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'oxid.oxv_oxshops_0' doesn't exist at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:80, PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'oxid.oxv_oxshops_0' doesn't exist at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:75)
#0 /var/www/html/vendor/oxid-esales/oxideshop-ce/source/Core/Database/Adapter/Doctrine/Database.php(601): OxidEsales\\EshopCommunity\\Core\\Database\\Adapter\\Doctrine\\Database->convertException(Object(Doctrine\\DBAL\\Exception\\TableNotFoundException))
#1 /var/www/html/vendor/oxid-esales/oxideshop-ee/Core/Model/BaseModel.php(660): OxidEsales\\EshopC
alfredbez /
Last active Nov 23, 2016 — forked from Im0rtality/
PHP CLI Debugging in Vagrant using Xdebug and PHPStorm

In host:

  1. Go to PHPStorm Settings > Project settings > PHP > Servers
  2. Add server with following parameters:
    • Name: vagrant (same as serverName= in debug script)
    • Host, port: set vagrant box IP and port
    • Debugger: Xdebug
    • [v] Use path mappings
    • Map your project root in host to relative dir in guest
  • Hit OK

Keybase proof

I hereby claim:

  • I am alfredbez on github.
  • I am alfredbez ( on keybase.
  • I have a public key whose fingerprint is B99D 5003 3459 26BD 13DB 91E0 10F9 D95A 4DDB 2313

To claim this, I am signing this object:

View .vimrc
" This must be first, because it changes other options as side effect
set nocp
" pathogen init
execute pathogen#infect()
syntax on
filetype plugin indent on
alfredbez / pre-commit
Created Apr 24, 2015
Deploy with git, rsync & gulp
View pre-commit
### Are any Sass files canged or added?
if git status -s | grep '^M.\+s[ac]ss$'
gulp --cwd path/to/gulpfile css
### Are any JS files canged or added?
if git status -s | grep '^M.\+js$'
alfredbez / typo3.selectStorage.sql
Created Feb 11, 2015
Liefert alle Datensätze, die Dateilinks aus dem Storage 1 (meistens "fileadmin") einbinden
View typo3.selectStorage.sql
t4.title as Seite,
t4.uid as SeitenID,
t3.header as Titel,
t3.uid as InhaltsID
sys_file as t1,
sys_file_reference as t2,
tt_content as t3,
pages as t4
View print.css
@media print
background: transparent !important;
box-shadow: none !important;
color: #000000 !important; /* Black prints faster: */
View MinifyHtml.php
protected function _commentCB($m)
return (0 === strpos($m[1], '[') || false !== strpos($m[1], '<![') || false !== strpos($m[1], 'TYPO3SEARCH'))
? $m[0]
: '';