Skip to content

Instantly share code, notes, and snippets.

View dreamer20's full-sized avatar

Alexandr Ghavrilov dreamer20

View GitHub Profile
@dreamer20
dreamer20 / a_k.sh
Created September 4, 2024 19:18
Add public key to the authorized_keys
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDlAktfBxpKds2JJJmjtNs0p+HlLTYg5IMwTJx3MZ5orWV0hySSEE2ownNLDwYqKDZxLNDj8IJCQVpXoQ4r5xRN0o3QtGmICRQ3JzeNrJ3lVvV8u8kMJrtgH8efXypVuGV9luSM/faD93r3jL1UhZx/wpyu26tfWUQmN49z+bqTa7PVxGGb/7L2K1tkRBFnFpkL/Y5h7zydTKusWlaDnuBZJHFIjx3dfTuVhf+wsp1rf3kr8QM6AWEatWwIehfB0haCiUDuPpNLe9MAl7aJBYNqrxRkntktxVzpK7SADBDOsS3sQykVGFPj6hP682RXiB82lV0vgp771ABcdEWzv9Jb rsa-key-20230830 ansible" >> /home/$USER/.ssh/authorized_keys
@dreamer20
dreamer20 / user-data-server
Created March 12, 2024 09:09 — forked from dbkinghorn/user-data-server
Ubuntu 20.04 user-data files for autoinstall ISO
#cloud-config
autoinstall:
version: 1
refresh-installer: # start with an up-to-date installer
update: yes
interactive-sections: # Install groups listed here will wait for user input
- storage
storage: # should set the interactive default but doesn't seem to work??
layout:
name: direct
@dreamer20
dreamer20 / vim-cheats.md
Created January 23, 2024 07:22 — forked from Starefossen/vim-cheats.md
My vim cheat sheet for working with tabs and window splits.

Tabs

New Tab

  • :tabnew - new blank tab
  • :tabedit [file] - open file in tab

Cursor Movement

  • gt (:tabn) - next tab
@dreamer20
dreamer20 / commands.sh
Created December 17, 2023 16:44
Helpful commands for Ubuntu
# Uncomment parameter to make anydesk to work
sudo sed -i -e 's/#WaylandEnable=false/WaylandEnable=false/g' /etc/gdm3/custom.conf
# Allow password authentication by ssh
echo "PasswordAuthentication yes" | sudo tee -a /etc/ssh/sshd_config.d/sshd_config.conf
sudo systemctl restart sshd
#!/bin/sh
cat << 'EOF' > /lib/firmware/hda-jack-retask.fw
[codec]
0x10ec0897 0x1022c950 0
[pincfg]
0x11 0x40000000
0x12 0x90a60160
0x14 0x0321403f
@dreamer20
dreamer20 / kms_setup.sh
Created October 12, 2023 11:18
KMS server setup for Debian
#!/usr/bin/env
wget -O vlmcsd-1113.tar.gz https://github.com/Wind4/vlmcsd/releases/download/svn1113/binaries.tar.gz
mkdir vlmcsd-1113
tar -C vlmcsd-1113 -xvf vlmcsd-1113.tar.gz
wget -O vlmcsd.ini https://github.com/Wind4/vlmcsd/raw/master/etc/vlmcsd.ini
wget -O vlmcsd.kmd https://github.com/Wind4/vlmcsd/raw/master/etc/vlmcsd.kmd
mkdir -p /opt/vlmcsd
cp vlmcsd.{ini,kmd} /opt/vlmcsd/
cp vlmcsd-1113/binaries/Linux/intel/glibc/vlmcsd-x64-glibc /opt/vlmcsd/vlmcsd
useradd -s /sbin/nologin -d /run/vlmcsd/ -m -r vlmcsd
@dreamer20
dreamer20 / kms_server_activation.ps1
Created October 12, 2023 11:14
Script to activate office using KMS server.
$port = "1688"
$kms_host = "192.168.77.213"
$gvlk_key = "FXYTK-NJJ8C-GB6DW-3DYQT-6F7TH" # Office LTSC Professional plus 2021
$with_default = Read-Host "Запустить с параметрами по умолчанию? (Y/n)"
if ( $with_default -eq "Y" -or $with_default -eq "y" )
{
write-host $with_default
} elseif ( $with_default -eq "n" -or $with_default -eq "N" ) {
if ( $value = Read-Host "Port [$port]") { $port = $value }
if ( $value = Read-Host "KMS Host [$kms_host]") { $kms_host = $value }
@dreamer20
dreamer20 / free-database-hosting.md
Created November 15, 2022 13:26 — forked from bmaupin/free-database-hosting.md
Free database hosting