Skip to content

Instantly share code, notes, and snippets.

View churneya's full-sized avatar

Sergey Smirnov churneya

View GitHub Profile
@churneya
churneya / create-cloud-init.sh
Created May 15, 2025 21:13
Create a cloud-init Debian 12 image on proxmox
# Download image with debian
wget https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2
# Create VM
qm create 9000 --name debian12-cloudinit --net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-pci
# Import storage
qm set 9000 --scsi0 local-lvm:0,import-from=/root/debian-12-generic-amd64.qcow2
# Resize storage to 10G
qm resize 9000 scsi0 10G
# Activate cloud-init
qm set 9000 --ide2 local-lvm:cloudinit
@churneya
churneya / ObjectMapper.md
Created November 8, 2024 06:36
Jackson Object Mapper
val objectMapper = ObjectMapper()
objectMapper.propertyNamingStrategy = PropertyNamingStrategies.SNAKE_CASE
objectMapper.writeValueAsString(rows.take(3))
@churneya
churneya / README.md
Created November 7, 2024 18:46
DIsable MicrosoftAutoUpdate

disable the service

launchctl disable gui/$(id -u)/com.microsoft.update.agent

check that the service is disabled

launchctl print-disabled gui/$(id -u) | grep microsoft
@churneya
churneya / README.md
Created October 28, 2024 07:18
disable chrome update on mac

Method that helped me:

  1. To empty these directories:
    rm -rf /Library/Google/GoogleSoftwareUpdate/*
    rm -rf ~/Library/Google/GoogleSoftwareUpdate/*
  2. Then change the permissions on these folders named 'GoogleSoftwareUpdate' so that there's no owner and no read/write/execute permissions.

In terminal:

[
"https://google.com",
"https://goo.gl"
].forEach(s => window.open(s, "_blank"))
kind: Pod
apiVersion: v1
metadata:
name: nfs-minio-test
spec:
volumes:
- name: data
persistentVolumeClaim:
claimName: nfs-pvc
containers:
<?php
$_SERVER["DOCUMENT_ROOT"] = realpath(dirname(__FILE__)."/../..");
$DOCUMENT_ROOT = $_SERVER["DOCUMENT_ROOT"];
define("NO_KEEP_STATISTIC", true);
define("NOT_CHECK_PERMISSIONS",true);
define('BX_NO_ACCELERATOR_RESET', true);
define('CHK_EVENT', true);
define('BX_WITH_ON_AFTER_EPILOG', true);
@churneya
churneya / ks.cfg
Last active December 4, 2019 22:35
virt-install \
--name smirnov.vpool \
--description "centos" \
--os-type=Linux \
--os-variant=rhel7.6 \
--ram=2048 \
--vcpus=2 \
--disk path=/home/ssmirnov/kvm/smirnov.qcow2,size=10 \
--graphics vnc \
--location https://mirror.yandex.ru/centos/7/os/x86_64/ \
cat *.tar.gz* >> mysite_backup.tar.gz
||
cat *$(ls | sort -V) > backup.tgz
tar xzvf mysite_backup.tar.gz
find . -type f -not -path "./local/vendor/*" -exec chmod 664 {} \;
find . -type d -not -path "./local/vendor/*" -exec chmod 775 {} \;
find . -type d -print0 | xargs -0 chmod 775
find . -type f -print0 | xargs -0 chmod 664