Skip to content

Instantly share code, notes, and snippets.

View dragolabs's full-sized avatar

Vitaly Shishlyannikov dragolabs

View GitHub Profile
@dragolabs
dragolabs / ubuntu-vnc-without-monitor.md
Created April 29, 2020 20:09
Run VNC without connected monitor to ubuntu Desktop

Install Video Dummy Package

sudo apt-get install xserver-xorg-video-dummy

Create Default X Windows Configuration File

Create / Edit xorg.conf file Rename file if already exists for backup

@dragolabs
dragolabs / proxmox-cli-and-tips.md
Last active January 4, 2024 10:21
Useful proxmox commands

Find next free VM ID

pvesh get /cluster/nextid

Create containter with external and internal nets

pct create 100 \
    local:vztmpl/ubuntu-16.04-standard_16.04-1_amd64.tar.gz \
    --cores 2 --cpuunits 1024 \
@dragolabs
dragolabs / vaultwarden-docker-compose.yml
Created October 13, 2023 07:30
vaultwarden + traefik + cloudflare dns
---
version: '3'
services:
vaultwarden:
image: vaultwarden/server:1.29.2
container_name: vaultwarden
restart: always
environment:
WEBSOCKET_ENABLED: true # Enable WebSocket notifications.
@dragolabs
dragolabs / jenkins-slave.service
Last active August 16, 2023 08:15
Supervisor and systemd config for jenkins slave
[Unit]
Description=Jenkins Slave
Wants=network.target
After=network.target
[Service]
ExecStart=/usr/bin/java -Xms512m -Xmx512m -jar /opt/jenkins/slave.jar -jnlpUrl http://${JENKINS_SERVER}/slave-agent.jnlp -secret ${SECRET}
User=jenkins
Restart=always
RestartSec=10
@dragolabs
dragolabs / nginx-log-format.conf
Last active April 26, 2023 16:17
Nginx log format and grok pattern for default (combined) and custom format
log_format custom '$remote_addr - $remote_user [$time_local] '
'"$request" $status $bytes_sent '
'"$http_referer" "$http_user_agent" '
'"$host" "$uri" "$args" "$sent_http_location" '
'"$proxy_host" "$upstream_addr" "$upstream_cache_status" '
'[$request_time] [$upstream_response_time]';

How to update letsencrypt SSL certificates with certbot on Proxmox host

Create this script in /opt/bin/proxmox-letsencrypt-renew.sh

#!/bin/bash

certbot renew >> /var/log/letsencrypt-renew.log
rm -rf /etc/pve/local/pve-ssl.pem
rm -rf /etc/pve/local/pve-ssl.key
#!/bin/bash
# Taken from http://rustyautopsy.github.io/rabbitholes/2014/10/21/vmcreate/
# Original author: Travis Dolan
DEFAULT_DISK_SIZE=32
DEFAULT_MEMORY=2048
DEFAULT_SOCKETS=1
DEFAULT_CORES=2
DEFAULT_ISO='ubuntu-14.04-server-amd64.iso'
@dragolabs
dragolabs / ovpn_in_lxc.md
Last active December 30, 2022 17:11
Openvpn server in lxc container

How to run openvpn in LXC container

For running openvpn server (or client) in CT you need to create tun (tap?) device.

In lxc config of container add line above. In proxmox we can find configs in /etc/pve/local/lxc/

lxc.cgroup.devices.allow: c 10:200 rwm

Then [re]start container and create tun device inside it. You can login into container or use proxmox tool pct:

@dragolabs
dragolabs / smbd.conf
Created April 29, 2020 13:10
Samba configuration with Apple Time Machine support
[global]
workgroup = WORKGROUP
min protocol = SMB3_00
server string = %h server (Samba, Ubuntu)
server role = standalone server
log file = /var/log/samba/log.%m

Setapp software free alternatives

  • Bartender - Dozer
  • DisplayBuddy - MonitorControl
  • iStat - Stats
  • .. - MeetingBar