Skip to content

Instantly share code, notes, and snippets.

View zippyy's full-sized avatar

Zippy zippyy

View GitHub Profile
@zippyy
zippyy / rootlogin.sh
Created July 14, 2024 02:04
rootlogin.sh
#!/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
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:
@zippyy
zippyy / create_sub.py
Created April 25, 2022 22:39 — forked from jinschoi/create_sub.py
Python script to generate Flipper RAW .sub files from OOK bitstreams
#!/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
@zippyy
zippyy / windows_privesc
Created March 28, 2022 15:35 — forked from sckalath/windows_privesc
Windows Privilege Escalation
// 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]
#!/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:
#
@zippyy
zippyy / ParseCSV.mjs
Created January 28, 2022 05:11 — forked from sbrl/ParseCSV.mjs
Quick CSV Parser that converts CSV files into an array of JS Objects.
"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) {
@zippyy
zippyy / readme.md
Created January 26, 2022 21:34 — forked from eddiewebb/readme.md
Hugo JS Searching with Fuse.js
$ErrorActionPreference = "Inquire"
Invoke-Command -ComputerName ComputerNameHere -ScriptBlock {Start-ADSyncSyncCycle -PolicyType delta}
Read-Host -Prompt "Press Enter to exit"
@echo off
echo Starting AD Sync (Delta)...
powershell.exe -ex bypass -command "ipmo adsync;Start-ADSyncSyncCycle delta;"
echo Finished script execution.
pause