Skip to content

Instantly share code, notes, and snippets.

View UnconventionalMindset's full-sized avatar
👋
Ciao! :3

Jac UnconventionalMindset

👋
Ciao! :3
View GitHub Profile
Set-NetFirewallProfile -DisabledInterfaceAliases "vEthernet (WSL (Hyper-V firewall))"
@UnconventionalMindset
UnconventionalMindset / codename.sh
Created January 9, 2024 11:00
Ubuntu get codename
#!/bin/bash
codename=$(lsb_release -c | sed 's/\(Codename:\s\)\(.*\)/\2/g')
echo "Ubuntu codename: ${codename}..."
$reboot
bash: /sbin/reboot: Input/output error
$shutdown -r now
bash: /sbin/shutdown: Input/output error
#
# if the above reboot commands doesn't work try either forced reboot or shutdown
#
{
"ignition": {
"version": "3.3.0"
},
"passwd": {
"users": [
{
"name": "core",
"sshAuthorizedKeys": [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCoPJQAHkfSRIfS05ptesdKwTX7ererHcTZ7pKWi7yUqOQv1e2xpfNBcfx/trwzITJe9N7bwp7t6gpPY2/yBr8F6TenigFWhDaF3Qi9kdSlv64eOsPv6iTg0URH7RE4RQwdArPuwAEBA79BOVoJ0qG/zgn0LOlqYGE/EameYxtgzDJNjXPWOi6OkPKhOEc00+wWGucsCw/8a6rzaMbQHn647yiS7XUJ9/QgMwZ5tqT+Fw/1dxzV4zrWK5MVEXlN5wRZEzukadPQJKyZhhhx3o7MqEVOsTHvyBln6NVJGFawQY7B+ffN/+9n6pEuskWCqngywqAvDXyRS7zD/Dxqv5pjzSQI2fkyuM21oRcKlSYx2AB4L46J6MRJ4ZLA5dhY0fwv868F5VFmJZ2AsDmaGFCqdXTMCv6VRnghJo75oybv+/eoV53NETrTeB4XsPOxSZOHmK93zJzGw2hT4X/ZTvyVbnCyU+Z4sg2iU8ZVE3pHJi8ZQ3hadW0N+CAAmVQ+zsE= nousername"
@UnconventionalMindset
UnconventionalMindset / coreos_embedded_ipxe.sh
Last active October 25, 2022 22:27
Embed Core OS installation to iPXE
#!/bin/bash
download_folder="ipxe"
install_script_url="https://gist.githubusercontent.com/UnconventionalMindset/f4ca2d66b943f916b5fecfad698b47ea/raw"
full_path="$HOME/${download_folder}"
[ -z $full_path ] && { echo "Error: download path is empty"; exit 1; } || echo "Download path set to: ${full_path}, continuing..."
apt -y install gcc binutils make perl liblzma-dev mtools genisoimage syslinux isolinux
@UnconventionalMindset
UnconventionalMindset / coreos-install.ipxe
Last active October 25, 2022 22:25
Script to embed to iPXE to run Fedora core OS from RAM
#!ipxe
set STREAM stable
set VERSION 36.20221001.3.0
set CONFIGURL https://raw.githubusercontent.com/UnconventionalMindset/coreos-setup/main/coreos.ign
set BASEURL https://builds.coreos.fedoraproject.org/prod/streams/${STREAM}/builds/${VERSION}/x86_64
dhcp
@UnconventionalMindset
UnconventionalMindset / embed.ps1
Last active October 26, 2022 12:46
Script to embed an ignite (.ign) to a Fedora Core OS iso.
$latest = "https://builds.coreos.fedoraproject.org/prod/streams/next/builds/36.20220906.1.0/x86_64/fedora-coreos-36.20220906.1.0-live.x86_64.iso"
$path = "C:\coreos-setup\"
$iso = "coreos-latest.iso"
$ign = "install.ign"
curl -o ${path}${iso} ${latest}
curl -o ${path}${ign} https://raw.githubusercontent.com/UnconventionalMindset/coreos-setup/main/install.ign
docker run -i `
-v ${path}${iso}:/$iso `
-v ${path}${ign}:/$ign `
quay.io/coreos/coreos-installer:latest `
@UnconventionalMindset
UnconventionalMindset / privateField.scala
Created February 2, 2022 02:05
Get Private field in Scala for debugging purposes
def privateField[A](obj: AnyRef, fieldName: String): A = {
val f = obj.getClass.getDeclaredField(fieldName)
f.setAccessible(true)
f.get(obj).asInstanceOf[A]
}
@UnconventionalMindset
UnconventionalMindset / arch.md
Last active April 13, 2024 01:04
Installation of Arch Linux on my Dell XPS laptop

Installation of Arch Linux on my Dell XPS 17 laptop

Pre-installation

  • Make sure EFI partition is of 550 MB
  • Microsoft Reserved Partition can be deleted
  • Turn encryption off when moving windows main partition
  • Keep the windows' bitlocker recovery key with you
  • Use AOMEI partition assistant to manage partitions on windows
  • Disable secure boot
  • Disable Intel RAID and select AHCI

Installation