Skip to content

Instantly share code, notes, and snippets.

View kuklofon's full-sized avatar

Alex Kuklofonov kuklofon

View GitHub Profile
@if0rest
if0rest / bitrix:news.sections.elements.md
Last active April 1, 2024 17:36
Совместный вывод разделов и элементов в bitrix:news.list.

ВЫВОД РАЗДЕЛОВ И ЭЛЕМЕНТОВ В bitrix:news.list

Часто возникает необходимость вывести разделы инфоблока с элементами на одной странице. Для этой цели подойдет связка catalog.sections + news.list. Или можно обойтись одним bitrix:news.list, немного кастомизировав шаблон компонента. Пойдем вторым путем.

Итак.

  1. Размещаем компонент bitrix:news.list на целевой странице.
  2. Копируем шаблон компонента в текущий шаблон сайта.
  3. Создаем в нем файл result_modifier.php с таким содержимым.
@basoro
basoro / proxmox-proxy
Created May 25, 2019 20:45
Running Proxmox behind a single IP address
I ran into the battle of running all of my VMs and the host node under a single public IP address. Luckily, the host is just pure Debian, and ships with iptables.
What needs to be done is essentially to run all the VMs on a private internal network. Outbound internet access is done via NAT. Inbound access is via port forwarding.
Network configuration
Here’s how it’s done:
Create a virtual interface that serves as the gateway for your VMs:
@tinoji
tinoji / proxmox_lxc_pct_provisioner.sh
Created February 7, 2018 01:02
Create and provision Proxmox LXC by pct command
pct create <id> /var/lib/vz/template/cache/centos-7-default_20170504_amd64.tar.xz \
-arch amd64 \
-ostype <centos|ubuntu|etc> \
-hostname <hostname> \
-cores <cores> \
-memory <memory(MB)> \
-swap <swap(MB)> \
-storage local-lvm \
-password \
-net0 name=eth0,bridge=<bridge>,gw=<gateway>,ip=<cidr>,type=veth &&\