This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Linux: check if another instance of this program is already running | |
* by looking through the /proc/<PID>/ entries */ | |
/** | |
* MIT License | |
* | |
* Copyright (C) 2024 Carsten Janssen | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
set -x | |
# how to run this script in podman: | |
# | |
# BUILD_ROOT="$HOME/Downloads" | |
# | |
# podman run --rm --init \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* MIT License | |
* | |
* Copyright (C) 2024 Carsten Janssen | |
* | |
* 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
/* | |
./bootstrap.sh --with-libraries=filesystem,url | |
./b2 -j4 link=static variant=release cxxflags="-O3 -ffunction-sections -fdata-sections" | |
g++ -O3 -Wall -Wextra -I. ../boost_misc.cpp -o ../boost_misc -Lstage/lib -lboost_filesystem -lboost_url -s -Wl,--gc-sections | |
*/ | |
/* generate UUID (header-only) */ | |
#include <boost/lexical_cast.hpp> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define USB_VENDOR_ID 0x12c9 | |
#define USB_PRODUCT_ID 0x1028 | |
Class-Specific Request (DOWN) | |
Destination: Interface, Index 2 | |
Reserved Bits: 34 | |
Request: 0x9 | |
Value: 0x300 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Public Domain code */ | |
/* find the highest version GLIBC_* symbol in a file or directory */ | |
#ifndef _GNU_SOURCE | |
#define _GNU_SOURCE | |
#endif | |
#include <ctype.h> | |
#include <elf.h> | |
#include <fcntl.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*** | |
Copyright (c) 2023 AppImage Community | |
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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Opt: | |
-O0 -Od | |
-O2 -O2 -Ot | |
-O3 -Ox -Ot | |
-Os -O1 -Os | |
-fomit-frame-pointer -Oy | |
Code gen: | |
-f[no-]rtti -gr[-] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Patch for coreutils 9.1 to copy a directory with a progress shown. | |
Better alternative: https://github.com/dmerejkowsky/pycp | |
--- a/src/copy.c | |
+++ b/src/copy.c | |
@@ -1815,16 +1815,80 @@ | |
&& ! overwrite_ok (x, dst_name, dst_dirfd, dst_relname, dst_sb))); | |
} | |
+// GPL3, Copyright (C) 2016 Xfennec, CQFD Corp. | |
+// https://github.com/Xfennec/progress/blob/master/sizes.c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MIT License | |
// Copyright (c) 2021 djcj <[email protected]> | |
// Elf file parsing code was taken from https://github.com/finixbit/elf-parser | |
// Copyright (c) 2018 finixbit | |
// 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 |
NewerOlder