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 / bootstrap.ipxe
Created September 20, 2023 14:57
iPXE bootstrap script based on client platform (efi, pcbios) and architecture (arm64, x86_64, i386).
#!ipxe
# Global variables used by other iPXE scripts
chain --autofree vars.ipxe ||
# First try to load a specifix boot script based on the client MAC address
# Boot <boot-url>/<boot-path>/mac-010203040506.ipxe if script is present
chain --replace --autofree ${ipxe_boot_path}mac-${mac:hexraw}.ipxe ||
# Loads ipxe boot script based client platform and architecture
@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 <tux@example.net>"
@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