| id | DE38DEE7-10BB-43D4-B74F-CF47E30CE946 |
|---|---|
| name | Unslopify |
| icon | wand.and.stars |
| tooltip | Deep cleanup audit with safe implementation |
| description | Audit and clean code slop across focused lanes: dead code, weak types, cycles, error hiding, legacy paths, bad comments, and obvious duplication. |
| // TODO: somehow enforce ordering at compile time | |
| type WriteOnly<T> = { | |
| -readonly [K in keyof T]: T[K]; // TODO: Typescript can't block setters like this natively :) | |
| }; | |
| type RouteHandler<T extends string> = ( // TODO: Extract from Bun... I think it has this built in | |
| req: Bun.BunRequest<T>, | |
| server: Bun.Server, | |
| ) => Response | Promise<Response>; |
There are many tutorials on the internet that tell you how to setup a PXE Boot server with PXELINUX. There are however other options to replace PXELINUX like GRUB2 and iPXE. In this tutorial, I'm going to teach you how to setup a PXE Boot Environment with GRUB2, and later add menu entries to boot many popular OSes.
Notice: I'm not going to repeat the part where you setup the DHCP and TFTP server. Such section in other tutorials still applies to this scenario.
think the GRUB2 image as the same as PXELINUX's pxelinux.0 file. Your DHCP server must point to it, and it must be available on your TFTP server. Instead of shoving a blob down your throat and telling you that it just works, I'm going to walk you through the process of making one yourself by using an readily available linux installation.
| #!/bin/sh | |
| # suggest.sh -- get suggestion keywords from several site | |
| # | |
| # Usage: | |
| # suggest SITE KEYWORDS... | |
| # SITE: | |
| # youtube(yt), archwiki(aw), duckduckgo(d), wikipedia(w), amazon(a) | |
| # Example: | |
| # suggest wikipedia Linux |
I wanted to be able to SSH into my Windows laptop directly into Linux. I also wanted to disable password authentication and only allow public key (RSA in my case) authentication.
Scott Hanselman wrote a blog post on how to make your default WSL2 distro your default shell for SSH. Windows OS Hub published an article on using public key authentication. These were both helpful resources.
I'll assume you're already familiar with using SSH keys. If not, this article at DigitalOcean is very informative.
First thing you want to do is create the file $HOME\.ssh\authorized_keys. If you run into issues, it could be due to incorrect file ownership.
| use bytes::{Buf, Bytes, BytesMut}; | |
| use opentelemetry::sdk; | |
| use opentelemetry::sdk::propagation::TraceContextPropagator; | |
| use opentelemetry::sdk::trace::{Builder, Sampler}; | |
| use opentelemetry::trace::TracerProvider; | |
| use opentelemetry::{global::set_text_map_propagator, KeyValue}; | |
| use std::convert::TryFrom; | |
| use std::env::var; | |
| use std::net::SocketAddr; | |
| use std::process::Stdio; |
| # Hybrid UEFI/BIOS multiboot USB drive | |
| # Install required packages | |
| sudo apt install gdisk grub2-common grub-efi-amd64-bin grub-pc-bin qemu-system | |
| # Create an empty disk image | |
| target_size=3.6G # $(lsblk -b --output SIZE -n -d /dev/sdX) for drive size | |
| qemu-img create -f raw boottitikku.img "$target_size" | |
| # Create a GUID Partition Table (GPT) |
| sudo -i | |
| export DEV="/dev/sda" | |
| export DEV="/dev/nvme0n1" | |
| export DM="${DEV##*/}" | |
| export DEVP="${DEV}$( if [[ "$DEV" =~ "nvme" ]]; then echo "p"; fi )" | |
| export DM="${DM}$( if [[ "$DM" =~ "nvme" ]]; then echo "p"; fi )" | |
| # export SDD_PASS=secret123 | |
| sgdisk --print $DEV | |
| sgdisk --zap-all $DEV |
| # Instruction + template repo: https://github.com/FedericoPonzi/rust-ci | |
| # Search and replace <YOUR_BINARY_NAME> with your binary name. | |
| name: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| tags: |
