This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Enable root SSH login with password on Debian | |
# Backup the current SSH configuration file | |
cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak | |
# Enable root login and password authentication | |
sed -i 's/^#PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config | |
sed -i 's/^#PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Peetaur's Proxmox Quorum Magic 'Fix All'. | |
======================================== | |
restarting these on the failed node, and the whole cluster might bring back quorum, fix corosync, and fix the red lights problem in the GUI. It's like rebooting without interrupting the VMs (reboot proxmox parts only). | |
To create this sequence, I used the order in /etc/rc2.d/, and then I tinkered until it worked: | |
Consider disabling HA first. | |
The procedure: | |
on all nodes, restart: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Settings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from typing import Iterable, Union, Any | |
# freq: frequency in Hz | |
# zerolen: length of space bit in μs | |
# onelen: length of mark bit in μs | |
# repeats: number of times to repeat sequence | |
# pause: time to wait in μs between sequences | |
# bits: string of ones and zeros to represent sequence |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// What system are we connected to? | |
systeminfo | findstr /B /C:"OS Name" /C:"OS Version" | |
// Get the hostname and username (if available) | |
hostname | |
echo %username% | |
// Get users | |
net users | |
net user [username] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://gist.github.com/koenpunt/40c0b042c453a1add0e8 | |
# | |
# Check if the user is in the right group | |
# and afterwards retrieve the SSH public key from LDAP | |
# Logs directly in Syslog | |
# requires ldap-utils | |
# | |
# sshd_config for OpenSSH 6.2 or higher: | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
/** | |
* Parses the source CSV into an array of objects. | |
* @param {string} source The source CSV to parse. | |
* @param {Boolean} [parse_numbers=true] Whether number-like values should be parsed with parseFloat() | |
* @returns {[object]} An array of objects. The keys are taken from the csv header. | |
*/ | |
export default function ParseCSV(source, parse_numbers = true) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ErrorActionPreference = "Inquire" | |
Invoke-Command -ComputerName ComputerNameHere -ScriptBlock {Start-ADSyncSyncCycle -PolicyType delta} | |
Read-Host -Prompt "Press Enter to exit" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
echo Starting AD Sync (Delta)... | |
powershell.exe -ex bypass -command "ipmo adsync;Start-ADSyncSyncCycle delta;" | |
echo Finished script execution. | |
pause |
NewerOlder