Skip to content

Instantly share code, notes, and snippets.

@alex1528
alex1528 / 99-displaymagic.rules
Created September 18, 2021 02:11 — forked from XenGi/99-displaymagic.rules
display magic
#/etc/udev/rules.d/99-displaymagic.rules
# enable LVDS on HDMI disconnect
SUBSYSTEM=="drm", ACTION=="change", RUN+="/usr/local/bin/displaymagic.sh"
@alex1528
alex1528 / addFHD.sh
Created September 18, 2021 02:11 — forked from gertoe/addFHD.sh
helper scripts for switching monitor configuration on the fly
#!/bin/sh
if [[ $INTEL_DRV == true ]];
then
# intel driver --> not necessary (fhd-mode already included)
LVDS="eDP1"
#SWYM
exit 1;
else
# modesetting driver
@alex1528
alex1528 / setup.sh
Created November 26, 2020 09:06 — forked from MakiseKurisu/setup.sh
Proxmox VE 6 GPU Passthrough
#!/bin/bash
# Reference guides:
# https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF
# https://pve.proxmox.com/wiki/Pci_passthrough
# https://pve.proxmox.com/wiki/Nested_Virtualization
# Remember to turn on SVM in BIOS and disable CSM
# Update packages
@alex1528
alex1528 / SaltShaker_install_en.md
Created August 29, 2018 14:34 — forked from hbokh/SaltShaker_install_en.md
Install SaltShaker on Ubuntu 16.04.1 LTS

This is a "best-effort" in translating the "install.txt" from SaltShaker into English.
I tried all steps myself on a recent Ubuntu-host and latest SaltStack-packages.


This installation note applies to SaltShaker v2.1.3.

SaltShaker on Ubuntu 16.04.1 LTS

NOTE All commands are to be run as user "root".

@alex1528
alex1528 / cloud-config.yml
Created April 19, 2018 05:59 — forked from janeczku/cloud-config.yml
Config files for running Rancher HA node on RancherOS alongside HAProxy for SSL termination
#cloud-config
rancher:
services:
rancher-server:
image: rancher/enterprise:v1.5.4
restart: unless-stopped
command:
- --db-host
- REPLACE_WITH_DB_HOST
- --db-user
@alex1528
alex1528 / cloud-config.yaml
Created April 19, 2018 05:37 — forked from janeczku/cloud-config.yaml
RancherOS iPXE boot script and cloud-config. Ramdisk based deployment with persistent storage on disk. Configures private IP on eth1 from EC2 metadata.
#cloud-config
hostname: rancher-os
ssh_authorized_keys:
- ssh-rsa REPLACE_WITH_PUBLIC_SSH_KEY
rancher:
debug: false
cloud_init:
datasources:
- ec2
state:

0. First install the pre-reqs

0.1 Installing

yum install mysql-server mysql php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-snmp php-pear-Net-SMTP php-mysql httpd -y

0.2 Configuring services

chkconfig mysqld on
chkconfig httpd on
service mysqld start
service httpd start
@alex1528
alex1528 / vyos-optimisations
Created October 27, 2017 08:46 — forked from RafPe/vyos-optimisations
vyos throughput optimizations
Server 2 sockets,6 cores each, 2.4ghz
# Set ixgbe options
# Limit RSS queues to the number of physical cores per cpu
# Disable offload
# When you change this, you need to run the command and reboot for it to take.
echo "options ixgbe LRO=0,0 MQ=1,1 RSS=6,6 VMDQ=0,0 vxlan_rx=0,0" > /etc/modprobe.d/ixgbe.conf
# Shut down HT cores
for i in $(seq 1 2 23); do
@alex1528
alex1528 / vyos_sample_site-2-site_vpn.sh
Created October 27, 2017 08:45 — forked from RafPe/vyos_sample_site-2-site_vpn.sh
Vyos sample site-to-site vpn configuration
# Virtual Tunnel Interface
# 172.196.17.188 - 172.196.17.191
set interfaces vti vti0 address 172.196.17.190/30
set interfaces vti vti0 description 'Virtual tunnel interface for VPN tunnel'
# Phase 2
set vpn ipsec esp-group ESP-Default compression 'disable'
set vpn ipsec esp-group ESP-Default lifetime '3600'
set vpn ipsec esp-group ESP-Default mode 'tunnel'
set vpn ipsec esp-group ESP-Default pfs 'dh-group16'
@alex1528
alex1528 / taskset.sh
Created August 3, 2017 15:11 — forked from ayufan/taskset.sh
KVM CPU pinning for Proxmox VE
#!/bin/bash
set -eo pipefail
VMID=200
cpu_tasks() {
expect <<EOF | sed -n 's/^.* CPU .*thread_id=\(.*\)$/\1/p' | tr -d '\r' || true
spawn qm monitor $VMID
expect ">"