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 / gigabyte_gsmcli_multi.py
Last active September 19, 2024 01:54
Perform the BIOS/BMC update on multiple Gigabyte nodes using GbUtility.
#!/usr/bin/env python3
import argparse
import multiprocessing
import os
import shutil
import subprocess
__author__ = 'Nilson Lopes <[email protected]>'
@noslin005
noslin005 / example-cli-argparse.py
Created March 16, 2023 20:21 — forked from tomschr/example-cli-argparse.py
Template for an example CLI program with argparse, docopts and logging
#!/usr/bin/env python3
import argparse
import logging
from logging.config import dictConfig
import sys
__version__ = "0.2.0"
__author__ = "Tux Penguin <[email protected]>"
@noslin005
noslin005 / ipxe.sh
Created January 13, 2023 19:52 — forked from robinsmidsrod/ipxe.sh
Bash functions for building iPXE in different ways
#!/bin/bash
make_ipxe() {
pushd "$HOME/src/forked/ipxe/src" >/dev/null &&
make CONFIG=chain bin/undionly.kpxe bin/ipxe.lkrn bin/ipxe.pxe bin/ipxe.usb &&
sudo install -v -m 0644 -g root -o root bin/undionly.kpxe /srv/salt/tftpd/files/undionly.kpxe &&
sudo install -v -m 0644 -g root -o root bin/ipxe.lkrn /srv/salt/tftpd/files/ipxe.lkrn &&
sudo install -v -m 0644 -g root -o root bin/ipxe.pxe /srv/salt/tftpd/files/ipxe.pxe &&
sudo salt-call -l quiet state.single file.recurse name=/srv/tftp source=salt://tftpd/files dir_mode=755 file_mode=644 &&
popd >/dev/null
@noslin005
noslin005 / install_latest_grml-live_debian_11.md
Created October 12, 2022 13:25
Download, Pack and Install latest grml-live on Debian 11

1. Install packages needed to build grml-live .deb

user@localhost$  apt-get --no-install-recommends install \
  build-essential \
  devscripts \
  fakeroot \
  asciidoc \
  docbook-xsl \
  xsltproc \
@noslin005
noslin005 / ipxe_build.md
Created April 3, 2022 22:00 — forked from rikka0w0/ipxe_build.md
Build IPXE

1. Install tools and config IPXE

# Install compiler and dependencies
sudo apt-get install -y git gcc make liblzma-dev

# Grab the source code
git clone https://github.com/ipxe/ipxe.git
cd ipxe/src

# Enable NFS support

Linuxでfioを使用して簡易ディスクベンチマーク!

LinuxでもCrystalDiskMarkぽいディスクベンチマークしたい】に触発されてCrystalDiskMarkの各バージョンのデフォルト値でのベンチマークパラメータをfioで再現してみました。 是非お使いください。

使い方

コマンド一例:

@noslin005
noslin005 / bash.py
Created October 20, 2021 03:00 — forked from kirpit/bash.py
Enables to run subprocess commands in a different thread with TIMEOUT option!
#! /usr/bin/env python
import threading
import subprocess
import traceback
import shlex
class Command(object):
"""
Enables to run subprocess commands in a different thread with TIMEOUT option.

Scripts to setup jumpserver in CentOS7.

Usage

After clone this repository, run the following command to deploy jumpserver:

bash setup.sh

Check log file if some errors happen when runing the command above:

@noslin005
noslin005 / sgdisk.md
Last active August 24, 2021 13:04
Create partition with sgdisk

Create Partition Legacy Boot

sgdisk -n 0:0:+1MiB -t 0:ef02 -c 0:grub /dev/sda
sgdisk -n 0:0:+1GiB -t 0:ea00 -c 0:boot /dev/sda
sgdisk -n 0:0:+4GiB -t 0:8200 -c 0:swap /dev/sda
sgdisk -n 0:0:+50GiB -t 0:8300 -c 0:root /dev/sda
sgdisk -n 0:0:0 -t 0:8300 -c 0:home /dev/sda

Create EFI BOOT Partition Scheme

@noslin005
noslin005 / ofed-ubuntu.sh
Created June 23, 2021 12:31
Install Mellanox Ofed on Ubuntu Machines
#!/bin/bash
# ofed-ubuntu.sh
# Install Mellanox Ofed on Ubuntu Machines
#
# Author: Nilson Lopes (06/17/2021)
ubuntu_release=$(awk -F '"' '/VERSION_ID/ {print $2}' /etc/os-release)
mofed_package_version='latest'
mofed_repo_base_url="https://linux.mellanox.com/public/repo/mlnx_ofed"