Skip to content

Instantly share code, notes, and snippets.

View ksn135's full-sized avatar
🇷🇺

Serg N. Kalachev ksn135

🇷🇺
View GitHub Profile
@ksn135
ksn135 / Organization.php
Created February 15, 2024 13:04
Protobuf examples
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: Organization.proto
namespace AppBundle\Diadoc\Api\Proto;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
[
{
"E_ERROR":"integer(1)",
"E_RECOVERABLE_ERROR":"integer(4096)",
"E_WARNING":"integer(2)",
"E_PARSE":"integer(4)",
"E_NOTICE":"integer(8)",
"E_STRICT":"integer(2048)",
"E_DEPRECATED":"integer(8192)",
"E_CORE_ERROR":"integer(16)",
@ksn135
ksn135 / EnteraProService.php
Created November 8, 2019 10:43
Service class to communicate with entera.pro API
<?php
/**
* This file is part of the Comedy Club Production informational system package.
*
* (c) Serg N. Kalachev <serg@kalachev.ru>, Telegram @ksn135
*
* Copyright 2019 Serg N. Kalachev <serg@kalachev.ru>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
@ksn135
ksn135 / up.sh
Created October 4, 2017 18:43
Send message to Telegram chat via bash script
#!/bin/bash
###########################################################
# UPdate SDOC production script, v0.1 #
# (c) October 2017 by Serg N. Kalachev <serg@kalachev.ru> #
###########################################################
START_HOUR=10
END_HOUR=19
CUR_HOUR=`date +"%H"`
TELEGRAM_AUTH="<censored>:<censored>"
@ksn135
ksn135 / FieldCalculator.php
Created May 28, 2017 14:58
Простой калькулятор с переменными
<?php
/*
* This file is part of the <censored> informational system package.
*
* (c) Serg N. Kalachev <serg@kalachev.ru>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace AppBundle\Util;
@ksn135
ksn135 / SectionQuery.php
Last active May 18, 2017 21:14
Shop categories routing for Symfony 1.4 with Propel 1.2
<php
class SectionQuery extends BaseSectionQuery
{
private $categories = null;
public function filterVisible()
{
return $this->filterByIsVisible(true);
}
@ksn135
ksn135 / ksn135_unifi.sh
Created April 11, 2017 22:31
UNIFI Access Point shell interface, especially for glavkino.ru
#!/bin/bash
# UNIFI Access Point shell interface, v0.1
# (c) April 2017 by Serg N. Kalachev <serg@kalachev.ru>
username=it
password=Wifi555out
baseurl=https://172.16.144.35:8443
site=default
cookie=/tmp/unifi_cookie
response=/tmp/unifi_response
curl_cmd="curl -s -o ${response} -c ${cookie} -b ${cookie} --insecure"

Keybase proof

I hereby claim:

  • I am ksn135 on github.
  • I am ksn135 (https://keybase.io/ksn135) on keybase.
  • I have a public key whose fingerprint is 5AC6 212A 5C5E B5D4 C4B5 EDB0 DC96 9657 7BEF 5523

To claim this, I am signing this object:

@ksn135
ksn135 / Action-generator.yml
Created August 3, 2015 04:46
s2a_collection_table example
# src/AppBundle/Resources/config/Action-generator.yml
generator: admingenerator.generator.doctrine
params:
model: AppBundle\Entity\Action
concurrency_lock: ~
bundle_name: AppBundle
pk_requirement: \d+
i18n_catalog: messages
embed_types:
- embed-Result-generator.yml
<?php
/*
* This file is part of the XXXXXXXXXXXXXXXXXXXXXXXX informational system package.
*
* (c) Serg N. Kalachev <serg@kalachev.ru>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/