Skip to content

Instantly share code, notes, and snippets.

View Vitexus's full-sized avatar
🤖
Coding as usual

Cybervitexus Vitexus

🤖
Coding as usual
View GitHub Profile
@Vitexus
Vitexus / pkg-php-tools.md
Created July 27, 2025 10:21
jak se používá pkg-php-tools ?

pkg-php-tools je balík pro Debian/Ubuntu (a další distribuce založené na Debianu), který pomáhá s tvorbou Debian balíčků pro knihovny a nástroje napsané v PHP. Používá se hlavně při vytváření balíčků, které dodržují Debian PHP policy.


✨ Hlavní funkce pkg-php-tools:

  • Automatické generování závislostí (Depends, Build-Depends, Provides)
  • Podpora pro knihovny instalované pomocí Composeru (debian/php-namespace, debian/php-deps, debian/php-provides)
  • Podpora instalace PHPUnit testů
  • Snadnější tvorba PEAR balíčků
@Vitexus
Vitexus / deb2repo.sh
Created November 19, 2021 22:12
Deb Repository with aptly
#!/bin/bash
TERM="xterm"
export TERM
BACKPORTS=" composer freight "
strstr() {
[ "${1#*$2*}" = "$1" ] && return 1
return 0
@Vitexus
Vitexus / deb2repo.sh
Created November 12, 2021 12:56
Add Package to repository
#!/bin/bash
TERM="xterm"
export TERM
BACKPORTS=" composer freight "
strstr() {
[ "${1#*$2*}" = "$1" ] && return 1
return 0
@Vitexus
Vitexus / FixFlexiBeeFIOCaptions.php
Created March 11, 2019 18:23
Update short ABO Captions to orignal full length
<?php
define('EASE_LOGGER', 'console|syslog|email');
define('EASE_APPNAME', 'FioCaptions');
$inc = 'includes/Init.php';
if (!file_exists($inc)) {
chdir('..');
}
require_once $inc;
@Vitexus
Vitexus / dockertool.php
Created July 25, 2018 06:47
Run Chosen docker images as named container
<?php
require_once '../vendor/autoload.php';
/**
* http://docker-php.readthedocs.io/en/latest/cookbook/container-run/
*/
use Amp\Loop;
use Docker\Docker;
use Docker\DockerClientFactory;
use Docker\API\Model\ContainersCreatePostBody;
<?php
/**
* @author Vítězslav Dvořák <[email protected]>
*
* Thanks to https://github.com/mledoze/countries
*/
require_once '../vendor/autoload.php';
$coder = new \FlexiPeeHP\FlexiBeeRW(null, ['evidence' => 'stat','offline'=>'true']);
@Vitexus
Vitexus / flexibee-countries-translations.json
Last active June 12, 2018 22:06
Import this file into your FlexiBee to use country names with English, Deutch or French language
{
"winstrom": {
"@version": "1.0",
"stat": [
{
"id": "code:AW",
"nazev": "Aruba",
"nazevA": "Aruba",
"nazevB": "Aruba",
"nazevC": "Aruba",
@Vitexus
Vitexus / blockchain-table.php
Created April 7, 2018 13:20
BlockChain LIKE MySQL Table using PHP Phinx
<?php
use Phinx\Migration\AbstractMigration;
class UserLog extends AbstractMigration
{
public $tableName = 'user_log';
public function up()
<?php
define('EASE_LOGGER', 'console|syslog');
define('EASE_APPNAME', 'FioCaptions');
require_once 'config.php'; //SetUp FlexiBee and Fio constatnts
$banker = new \FlexiPeeHP\Banka();
$downloader = new \FioApi\Downloader(constant('FIO_RO_TOKEN'));
try {
@Vitexus
Vitexus / flexibee-evidencies.sql
Created November 18, 2017 01:20
SQL Queries For Each FlexiBee evidence
This file has been truncated, but you can view the full file.
############################################ analyza-nakupu ###########################################################
/* centralServer LOG*/ select hodnota from cssetting where klic = $1
/* centralServer DETAIL*/ parameters: $1 = 'ACCESS_CONTROL_ALLOW_ORIGIN'
/* centralServer LOG*/ select a.attname from pg_class c join pg_attribute a on a.attrelid = c.oid join pg_type t on t.oid = a.atttypid where relname = 'csuzivatel' and a.attnum > 0 and not a.attisdropped order by a.attnum
/* centralServer LOG*/ SELECT max(dbversion) FROM dbversion WHERE needreimport = 't'