Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
import urllib.request
import json
import ssl
url="https://wiki.fogproject.org/wiki"
ctx = ssl.create_default_context()
ctx.check_hostname = False
# Updates the version numbers.
# Arguments:
# $1 The second is branch or typed as full.
versionUpdate() {
local testvar=$1
[[ ! -w packages/web/lib/fog/system.class.php ]] && echo "Cannot open system.class.php for writing, exiting." && return 0
[[ $testvar == full ]] && channel="Stable"
[[ -z $channel ]] && channel="alpha"
channel=$(echo $channel | awk '{print tolower($0)}')
echo -n "Updating version file... "
--- fos/Buildroot/board/FOG/FOS/rootfs_overlay/bin/fog.upload 2020-09-25 19:06:30.170710100 +0200
+++ mnt/bin/fog.upload 2021-03-07 14:05:20.000000000 +0100
@@ -138,11 +138,28 @@
removePageFile "$part"
shrinkPartition "$part" "$imagePath/d1.original.fstypes" "$fixed_size_partitions"
done
+ local hasgpt=0
+ hasGPT "$hd"
+ if [[ $hasgpt -eq 1 ]]; then
+ echo " * Moving Partitions on disk $hd"
@Sebastian-Roth
Sebastian-Roth / kernel_config.diff
Created June 20, 2020 14:08
kernel_config_diff-current-vs-george
--- kernelsourcex64/.config 2020-06-16 16:55:06.973718308 -0500
+++ Geo_5.6.18.conifig 2020-06-20 09:01:28.786465540 -0500
@@ -4,10 +4,10 @@
#
#
-# Compiler: gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
+# Compiler: gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
#
CONFIG_CC_IS_GCC=y
@Sebastian-Roth
Sebastian-Roth / hddinfo.c
Created October 24, 2017 21:07
Get HDD infos like serial
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/hdreg.h>
#include <unistd.h>
int main(int argc, char *argv[])