Skip to content

Instantly share code, notes, and snippets.

Avatar
🤖
Coding as usual

Cybervitexus Vitexus

🤖
Coding as usual
View GitHub Profile
@Vitexus
Vitexus / FixFlexiBeeFIOCaptions.php
Created Mar 11, 2019
Update short ABO Captions to orignal full length
View FixFlexiBeeFIOCaptions.php
<?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 Jul 25, 2018
Run Chosen docker images as named container
View dockertool.php
<?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;
View fixFlexiBeeCountryCodes.php
<?php
/**
* @author Vítězslav Dvořák <info@vitexsoftware.cz>
*
* 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 Jun 12, 2018
Import this file into your FlexiBee to use country names with English, Deutch or French language
View flexibee-countries-translations.json
{
"winstrom": {
"@version": "1.0",
"stat": [
{
"id": "code:AW",
"nazev": "Aruba",
"nazevA": "Aruba",
"nazevB": "Aruba",
"nazevC": "Aruba",
@Vitexus
Vitexus / blockchain-table.php
Created Apr 7, 2018
BlockChain LIKE MySQL Table using PHP Phinx
View blockchain-table.php
<?php
use Phinx\Migration\AbstractMigration;
class UserLog extends AbstractMigration
{
public $tableName = 'user_log';
public function up()
View FlexiBeeFIOCaptions.php
<?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 Nov 18, 2017
SQL Queries For Each FlexiBee evidence
View flexibee-evidencies.sql
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'
@Vitexus
Vitexus / Vagrantfile
Created May 4, 2017
Instant Redmine Vagrantfile
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# 1) Create an directory
# 2) Put this Vagrantfile and your Redmine (EasyRedmine/EasyProject) zip Archive into
# 3) vagrant up
# 4) wait for provision to be done
# 5) run command: sudo -H -u easy bash -c ..
# 6) reboot the vagrant virtual machine
# 7) see application in action on http://localhost:8080
@Vitexus
Vitexus / movedone.js
Created Dec 7, 2016
FiltaQuilla script to move all ticket messages to folder "done"
View movedone.js
/*
* FiltaQuilla script to move all ticket messages to folder "done"
*/
destfolderName = "done";
Components.utils.import("resource:///modules/iteratorUtils.jsm");
Components.utils.import("resource:///modules/MailUtils.js");
let acctmgr = Cc["@mozilla.org/messenger/account-manager;1"].getService(Ci.nsIMsgAccountManager);
@Vitexus
Vitexus / backuppcetc.sh
Created Nov 24, 2016
Make backup for given host's /etc/ by one command ( by using BackupPC )
View backuppcetc.sh
#!/bin/bash
#1) Ask for host
if [ -z $1 ];
then
echo -n "Host to backup and press [ENTER]: "
read sourcehost
else
sourcehost=$1
fi