Skip to content

Instantly share code, notes, and snippets.

View noslin005's full-sized avatar

Nilson Lopes noslin005

  • Source Code Corp.
  • United States of America
View GitHub Profile
@noslin005
noslin005 / pproc.py
Created July 23, 2020 23:38 — forked from bbengfort/pproc.py
Runs multiple subprocesses in parallel, serializing stdout.
#!/usr/bin/env python3
# pproc
# Runs multiple subprocesses in parallel, serializing stdout.
#
# Author: Benjamin Bengfort <[email protected]>
# Created: Wed Jun 14 15:20:05 2017 -0400
#
# Copyright (C) 2017 Bengfort.com
# For license information, see LICENSE.txt
#

Hi,

I packaged a few of Intel's out of tree NIC drivers from http://sourceforge.net/projects/e1000/ as dkms based .debs and included them in a custom grml image.

I'll explain how; if there is interest, I can also share my packages (although, as you'll see, they're likely sub-par, because I did not take the time to really understand what I was doing; in particular, I fear the e1000e module may not always build correctly at grml-live time, while it builds

@noslin005
noslin005 / scanner.py
Created May 25, 2020 05:11
scan network using nmap
#!/usr/bin/python
import nmap
target_mac = '<Enter MAC Adress>'
nm = nmap.PortScanner()
nm.scan(hosts='10.0.0.0/24', arguments='-n -sP')
@noslin005
noslin005 / BMC and ipmitool.md
Last active February 17, 2025 15:23
Use ipmitool with supermicro boards
  1. Read the fan speed mode:
ipmitool -H <IP> -U <USER> -P <PASSWD> raw 0x30 0x45 0x00

The values are:

  • Standard: 0
  • Full: 1
  • Optimal: 2
  • Heavy IO: 4
@noslin005
noslin005 / grml remaster tips.md
Last active December 2, 2023 06:41
Remastering grml

Re-mastering GRML 2018.12 Small

Nilson Lopes | Thursday, March 12, 2020

It is recommended that you use grml-live to build your own disc.

  • Loop mount the ISO image:
├── iso      	<-- mount the original iso here
@noslin005
noslin005 / chroot fix grub.md
Created February 28, 2020 15:21
Reinstalling grub-efi on your hard drive
[ -d /sys/firmware/efi ] && echo "EFI boot on HDD" || echo "Legacy boot on HDD"
mkdir /target

# list drives
fdisk -l

# find each partition, i.e, /, /boot, /boot/efi and /home

# mount them
@noslin005
noslin005 / mdraid_fix.sh
Created February 4, 2020 01:44
Fix mdadm RAID after OS Reinstall
# reassemble the raid
sudo mdadm --assemble --scan
sudo mdadm --detail --scan | sudo tee -a /etc/mdadm.conf
# Rebuild kernel to include the raid configuration
sudo dracut -f /boot/initramfs-$(uname -r).img $(uname -r)
sudo grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
# Remake the file system
sudo sfdik --delete /dev/md0
@noslin005
noslin005 / rhel7.ks
Last active January 31, 2020 23:47
RedHat 7 KS
#version=RHEL7
# System authorization information
auth --enableshadow --passalgo=sha512
# Use graphical install
graphical
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=sde
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
@noslin005
noslin005 / raid.cfg
Created January 7, 2020 03:36
Debian RAID 1 Legacy Boot
# The method should be set to "raid".
d-i partman-auto/method string raid
# Specify the disks to be partitioned. They will all get the same layout,
# so this will only work if the disks are the same size.
d-i partman-auto/disk string /dev/sda /dev/sdb
# Next you need to specify the physical partitions that will be used.
d-i partman-auto/expert_recipe string \