Skip to content

Instantly share code, notes, and snippets.

View wranders's full-sized avatar
👀

W Anders wranders

👀
View GitHub Profile

Dell IPMI Fan Control

Third-Party PCIe Response

Disable:

ipmitool -I lanplus -H <IPADDRESS> -U <USERNAME> -P '<PASSWORD>' raw \
0x30 0xCE 0x00 0x16 0x05 0x00 0x00 0x00 0x05 0x00 0x01 0x00 0x00
@wranders
wranders / README.md
Created September 22, 2023 16:23
Generate random strings using bash and powershell.

Generate Random Strings

Powershell

$characters = ([char]'-',[char]'_')+([char]'0'..[char]'9')+([char]'a'..[char]'z')+([char]'A'..[char]'Z')

$length=128

# Print to STDOUT
@wranders
wranders / readme.md
Created February 27, 2023 19:06 — forked from lgg/keepass-file-format-explained.md
Keepass file format explained

Keepass file format explained

I’m currently working (I’m just at the beginning, and I’m quite slow) on a personal project that will use Keepass files (kdb and kdbx).
I tried to find some documentation about .kdb and .kdbx format, but I didn’t find anything, even in the Keepass official website. I you want to know how these file formats are structured, you must read Keepass’s source code. So I wrote this article that explains how Keepass file format are structured, maybe it will help someone.

@wranders
wranders / openssl.rs
Last active July 26, 2023 22:57
Generate EC and RSA key pairs using rust-openssl
use openssl::bn::BigNumContext;
use openssl::ec::{EcGroup,EcKey,EcPoint,PointConversionForm};
use openssl::nid::Nid;
use openssl::pkey::{Private,Public};
use openssl::rsa::Rsa;
use openssl::symm::Cipher;
fn main() -> Result<(), Box<dyn std::error::Error>> {
// private key passphrase
const PASSPHRASE: &[u8] = "some passphrase".as_bytes();
# use at your own risk, might eat hamster and nose dragons
git branch -m master master-bak
git checkout --orphan master
git reset --hard
git commit --allow-empty -m 'init'
git merge --ff --squash master-bak
git commit --amend
git push --force
@wranders
wranders / setup-crio.sh
Created November 9, 2020 17:30 — forked from inductor/setup-crio.sh
setup-crio.sh
#!/bin/bash
set -ex
# Set up required sysctl params, these persist across reboots.
cat > /etc/sysctl.d/99-kubernetes-cri.conf <<EOF
net.bridge.bridge-nf-call-iptables = 1
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-ip6tables = 1
EOF
@wranders
wranders / README.md
Last active February 16, 2020 00:23
Go HTTPS Server with Nginx Client Certificate Authenication/Encryption

Go TLS Server with Nginx Client Certificate Authenication/Encryption

This Gist demonstrates the use of a Go TLS server behind an Nginx reverse proxy and backend communication over TLS with Client Authentication certificates.

This is useful when an end server is not on the same host as Nginx and communication must still be encrypted. Since Nginx cannot pass-through TLS sessions, it must terminate the Client session and pass information over its own.

@wranders
wranders / 01-header
Last active January 12, 2018 19:19
CLI/SSH MOTD Showing System Info
#!/bin/sh
#
# 01-header - CLI/SSH MOTD
# Author: W Anders <https://github.com/wranders>
#
# Written for use with `update-motd` package on
# Ubuntu/Debian systems, but should work with any MOTD
# package using the bash shell.
# Ensure this file has execute permissions
# ( chmod +x /etc/update-motd.d/01-header )