Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
TARGET=/backups/mysqldatabases
IGNORE="mysql|information_schema|performance_schema|test"
CONF=/etc/mysql/debian.cnf
HOST=localhost
PORT=3306
USER=root
PASSWORD=
@dominikzogg
dominikzogg / accessor.php
Last active August 29, 2015 14:06
accessor sample
<?php
/**
* Class Test
* @method $this setVar1(string $var1)
* @method $this getVar1()
* @method string getVar2()
*/
class Test
{
#!/bin/bash
for f in *.mkv ; do ffmpeg -i "$f" -c:v libvpx -b:v 2M -c:a libvorbis "${f%.mkv}.webm" ; done
@dominikzogg
dominikzogg / CRUDTrait.php
Created January 22, 2015 06:53
CRUDTrait.php Skeleton
<?php
trait BaseTrait
{
abstract public function getDoctine();
}
abstract class BaseClass
{
use BaseTrait;
@dominikzogg
dominikzogg / create-symfony-project.sh
Last active October 1, 2015 16:35
create-symfony-project.sh
#!/bin/bash
if [ -z "$1" ]; then
echo "please enter a projectname: myproject"
exit 1
fi
if [ -z "$2" ]; then
echo "please enter a symfony version: 2.7.5"
exit 1
@dominikzogg
dominikzogg / config
Last active January 7, 2017 12:14
terminator-config-elementary-style (.config/terminator/config)
[global_config]
enabled_plugins = LaunchpadCodeURLHandler, APTURLHandler, LaunchpadBugURLHandler
suppress_multiple_term_dialog = True
title_inactive_bg_color = "#22272a"
title_inactive_fg_color = "#a8b7b9"
title_receive_bg_color = "#22272a"
title_receive_fg_color = "#a8b7b9"
title_transmit_bg_color = "#363b3e"
title_transmit_fg_color = "#94a3a5"
[keybindings]
<?php
$old = [
'name' => 'Old name',
'active' => true,
'description' => 'This is a description',
'items' => [
[
'name' => 'Old item name',
'active' => true,
@dominikzogg
dominikzogg / .hyper.js
Last active March 20, 2020 14:24
hyper.is for elementary os
"use strict";
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
// default font size in pixels for all tabs
@dominikzogg
dominikzogg / generate-swagger-based-php-api-client.sh
Created October 9, 2019 07:43
generate-swagger-based-php-api-client.sh
docker run --rm -v ${PWD}:/local swaggerapi/swagger-codegen-cli-v3:3.0.11 generate -l php -i /local/swagger.yaml -o /local/php
@dominikzogg
dominikzogg / EntityManagerDecorator.php
Created October 29, 2019 18:58
EntityManager within Swoole
<?php
declare(strict_types=1);
namespace App\Orm;
use Doctrine\DBAL\Connection;
use Doctrine\ORM\Decorator\EntityManagerDecorator as DoctrineEntityManagerDecorator;
use Doctrine\ORM\EntityManager;