Skip to content

Instantly share code, notes, and snippets.

View xTCry's full-sized avatar
🦉
Power On

Vladislav Khr xTCry

🦉
Power On
View GitHub Profile
@xTCry
xTCry / README.md
Last active May 30, 2023 09:56
[YSTU WPROG] Темная тема

[YSTU WPROG] Dark theme

Установка с помощью Stylus

Если у вас установлено расширение Stylus, вы можете установить тему, перейдя по ссылке ниже.\

Install directly with Stylus

screenshot

@xTCry
xTCry / README.md
Last active December 19, 2022 09:24
[YSTU WPROG] Мобильная адаптация

[YSTU WPROG] Mobile adaptation

Установка с помощью Stylus

Если у вас установлено расширение Stylus, вы можете установить тему, перейдя по ссылке ниже.
(Для ПК не актуально, но как пример)

Install directly with Stylus

@xTCry
xTCry / sym.php
Created November 3, 2022 20:41
Bitrix sym links (php)
<?php
function removeLinks()
{
$strError = [];
if (is_link($_SERVER['DOCUMENT_ROOT'] . '/bitrix')) {
unlink($_SERVER['DOCUMENT_ROOT'] . '/bitrix');
} else {
$strError[] = 'Папка bitrix не была ссылкой';
}
if (is_link($_SERVER['DOCUMENT_ROOT'] . '/upload')) {

Lab №3

1 Часть

1.1 Удаление всех портов

config vlan vlanid 1 delete 1-26

1.2 Проверка

show vlan

1.3 Создание 4 группы vlan

create vlan vlanid 2-5

@xTCry
xTCry / README.md
Last active March 8, 2025 20:23
[Bitrix] (УСТАРЕЛО/DEPRECATED) Кнопка "Показать еще" для news.list

[Bitrix] Кнопка "Показать еще" для news.list

УСТАРЕЛО/DEPRECATED

Файлы

  • script.js скрипт для компонента news.list (можно сделать универсальным)
  • style.css содержимое стиля кнопки

Настройка шаблона компонента news.list

Обозначение участка для отображения

@xTCry
xTCry / add.review.php
Created March 1, 2020 19:14
[Bitrix] Simple notifications in Telegram bot about new reviews on the site
<?
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");
require_once("./tg.api.php");
// get data from $_REQUEST
$P_NAME = 'XX Name';
$P_TEXT = 'Ohh myy megga supperRrrandom review msg -> ' . rand(95454, 465464);
$P_STARS = 4;
@xTCry
xTCry / customCIN.cpp
Last active November 16, 2019 22:32
[Console] Customizer std::cin
#include "iostream"
#include <string>
#include <cstdlib>
#include <cxxabi.h>
using namespace std;
#define INT_MAX 2147483647 // maximum (signed) int value
@xTCry
xTCry / Install-Code-Server.md
Last active June 22, 2024 19:03
Fast install VSCode - Code-server

Fast install

Run by non-root user

curl -fsSL https://code-server.dev/install.sh | sh

Run the code-server command to start the service and generate the config, then you can immediately complete it

{
init: (elevators, floors) => {
const unduplicator = (x) => x.filter((e, i) => x.indexOf(e) === i);
const reformateFloorsDirection = (elevator, floorNum) => {
const direction = elevator.destinationDirection() !== "stopped" ? elevator.destinationDirection()
: elevator.destinationQueue[0] >= floorNum ? "up" : "down";
elevator.destinationQueue = unduplicator(elevator.destinationQueue.sort((a, b) => {
if((floorNum <= a || elevator.getPressedFloors().includes(floorNum)) && direction == "down")
@xTCry
xTCry / README.md
Last active October 3, 2019 09:55
NodeJS service for bot or API getting TimeTable

NodeJS service for bot or API getting TimeTable

File sheetService.js - piece of code

spreadsheetIds - array IDs doc from docs.google.com/spreadsheets

Example Google Sheet