Skip to content

Instantly share code, notes, and snippets.

View Guiorgy's full-sized avatar

Guiorgy Guiorgy

  • Ecopre
  • Georgia
View GitHub Profile
@Guiorgy
Guiorgy / entrypoint.sh
Created August 5, 2025 14:58
A Docker entry point script that manages multiple daemons/services
#!/bin/bash
# Bash 4+ requred
# Copyright 2025 Guiorgy
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@Guiorgy
Guiorgy / cross-compile-gcc.ps1
Last active May 23, 2025 16:05
Cross-compile a C/C++ project for Linux on a Windows host using Docker
<#
Copyright © 2025 Guiorgy
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
@Guiorgy
Guiorgy / publish-linux-aot.ps1
Last active February 27, 2025 13:44
Publish a .NET AOT project for Linux on a Windows host using Docker
<#
Copyright © 2025 Guiorgy
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
@Guiorgy
Guiorgy / zfs_health.sh
Last active January 21, 2025 13:14 — forked from petervanderdoes/zfs_health.sh
ZFS Health Check Script
#!/usr/bin/env bash
# Copyright 2025 Guiorgy
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the “Software”), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
@Guiorgy
Guiorgy / boot-time.sh
Last active January 21, 2025 13:33
Calculate the total boot time in seconds on a Systemd system
#!/bin/sh
# Copyright © 2024 Guiorgy
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
@Guiorgy
Guiorgy / OptimizeDockerDesktop.ps1
Created May 2, 2024 10:27
A PoweShell script to reduce the size of the WSL virtual volume used by Docker Desktop
# Stop the Docker service
Stop-Service com.docker.service
# Stop the Docker processes
Stop-Process -Name "docker.exe" -Force
Stop-Process -Name "Docker Desktop.exe" -Force
# Stop WSL
wsl --shutdown
@Guiorgy
Guiorgy / appendNotice.ps1
Created March 19, 2024 17:48
Appends a GPLv3 liecense notice to the top of every C# source file
$comment = @"
/*
This file is part of [PROJECT] (Copyright © [YEAR] [AUTHOR]).
[PROJECT] is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
[PROJECT] is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Foobar. If not, see <https://www.gnu.org/licenses/>.
*/
"@
@Guiorgy
Guiorgy / build.sh
Last active June 20, 2025 15:05
Download the latest, or a specified, Fastfetch release source and build a DEB package
#!/usr/bin/env bash
# Copyright © 2024 Guiorgy
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
@Guiorgy
Guiorgy / DateTimeIsoExtensions.cs
Last active January 21, 2025 13:38
Convert a DateTime object to and from an ISO string faster than the builtin methods
/*
Copyright © 2023 Guiorgy
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
#!/usr/bin/env bash
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
#
# In jurisdictions that recognize copyright laws, the author or authors