Skip to content

Instantly share code, notes, and snippets.

View pavly-gerges's full-sized avatar
🤖
Electrostat Lab.

Pavly Gerges (pavl_g) pavly-gerges

🤖
Electrostat Lab.
View GitHub Profile
@pavly-gerges
pavly-gerges / PROPOSITIONAL_SYMBOLS_LATEX_OBSIDIAN.md
Created July 19, 2024 01:31 — forked from zudsniper/PROPOSITIONAL_SYMBOLS_LATEX_OBSIDIAN.md
📋 Propositional Logic symbols & their LaTeX formulas specifically for Obsidian flavor Markdown

Certainly! Obsidian is a popular note-taking application that supports Markdown with LaTeX integration for mathematical notation. When using LaTeX in Obsidian's Markdown flavor, you typically enclose the LaTeX code within double dollar signs $$...$$ for block math and single dollar signs $...$ for inline math.

Here's an exhaustive list of the symbols for propositional logic and their formulas specifically formatted for Obsidian flavor Markdown:

  1. Conjunction (AND)

    • Symbol: ∧
    • Obsidian Markdown: $\land$ or $\wedge$
  2. Disjunction (OR)

  • Symbol: ∨
@pavly-gerges
pavly-gerges / linking-error.log
Created June 9, 2024 21:28
Logs when linking failed at the compile-time
electrostat-lab@electrostat-workstation:~/Sandbox/Electrostatic-Sandbox/electrostatic-sandbox-framework$ ./helper-scripts/ci-cd/test-e4j.sh
> Task :electrostatic4j-examples:run FAILED
Jun 09, 2024 1:26:00 AM electrostatic4j.util.loader.NativeImageLoader loadLibrary
INFO: Created extraction directory!
Jun 09, 2024 1:26:01 AM com.avrsandbox.snaploader.NativeBinaryLoader cleanExtractBinary
INFO: Extracted successfully to /home/electrostat-lab/Sandbox/Electrostatic-Sandbox/electrostatic-sandbox-framework/electrostatic4j/electrostatic4j-examples/libs/bin/libelectrostatic4j.so
Jun 09, 2024 1:26:01 AM com.avrsandbox.snaploader.NativeBinaryLoader loadBinary
INFO: Successfully loaded library: /home/electrostat-lab/Sandbox/Electrostatic-Sandbox/electrostatic-sandbox-framework/electrostatic4j/electrostatic4j-examples/libs/bin/libelectrostatic4j.so
/opt/electrostatic-sandbox/jdk-20.0.2/bin/java: symbol lookup error: /home/electrostat-lab/Sandbox/Electrostatic-Sandbox/electrostatic-sandbox-framework/electrostatic4j/elec
@pavly-gerges
pavly-gerges / error.log
Created June 6, 2024 20:00
Error due to `n-tuple` duplicates when putting an object definition in headers and including the headers in multiple compilation units, resulting in `n-tuple` duplicate definitions during the linking procedure.
[100%] Linking C executable hello_comm.c-a.elf
/usr/bin/ld: /home/runner/work/Electrostatic-Sandbox/Electrostatic-Sandbox/electrostatic-sandbox-framework/electrostatic-core//build/x86/libelectrostatic-a.a(init_protocol.c.o):(.bss+0x70): multiple definition of `serial'; CMakeFiles/hello_comm.c-a.elf.dir/src/hello_comm.c.o:(.bss+0x70): first defined here
/usr/bin/ld: /home/runner/work/Electrostatic-Sandbox/Electrostatic-Sandbox/electrostatic-sandbox-framework/electrostatic-core//build/x86/libelectrostatic-a.a(init_protocol.c.o):(.bss+0x54): multiple definition of `parallel'; CMakeFiles/hello_comm.c-a.elf.dir/src/hello_comm.c.o:(.bss+0x54): first defined here
/usr/bin/ld: /home/runner/work/Electrostatic-Sandbox/Electrostatic-Sandbox/electrostatic-sandbox-framework/electrostatic-core//build/x86/libelectrostatic-a.a(init_protocol.c.o):(.bss+0x0): multiple definition of `usbfs'; CMakeFiles/hello_comm.c-a.elf.dir/src/hello_comm.c.o:(.bss+0x0): first defined here
/usr/bin/ld: /home/runner/work/Electrostatic-Sandbox/E
@pavly-gerges
pavly-gerges / error.txt
Created June 5, 2024 23:02
Unusual position independent error
electrostat-lab@electrostat-workstation:~/Sandbox/Electrostatic-Sandbox/electrostatic-sandbox-framework$ ./helper-scripts/ci-cd/compile-e4j.sh
Compiling and Assembling e4j-core
BUILD SUCCESSFUL in 1s
7 actionable tasks: 2 executed, 5 up-to-date
Compiling e4j-native
> Task :electrostatic4j-native:compileX86
-- GCC: /usr/bin/gcc
-- GPP: /usr/bin/g++
@pavly-gerges
pavly-gerges / wget_google_drive_download.md
Created June 2, 2024 03:51 — forked from emxsys/wget_google_drive_download.md
Download Google Drive files with WGET

How to download files from Google Drive with WGET

Step 1. Get the ID of the file to download

  1. Get a shareable link from Google Drive by right-clicking the file and selecting Get Shareable Link.

  2. Examine the link to get the file's ID. Example:

    https://docs.google.com/open?id=[ID]

Step 2. Download the file with WGET

  1. Build the download URL using the ID obtained in Step 1. Example:
@pavly-gerges
pavly-gerges / cdrom.h
Created May 31, 2024 09:37
IOCTL Magic encodings for CDROM operation @ `/usr/include/linux/cdrom.h`.
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
* -- <linux/cdrom.h>
* General header file for linux CD-ROM drivers
* Copyright (C) 1992 David Giller, [email protected]
* 1994, 1995 Eberhard Mönkeberg, [email protected]
* 1996 David van Leeuwen, [email protected]
* 1997, 1998 Erik Andersen, [email protected]
* 1998-2002 Jens Axboe, [email protected]
*/
@pavly-gerges
pavly-gerges / ioctl.h
Created May 31, 2024 09:35
Generic IOCTL Macro Functions for all IOCTL routing controls @ `/usr/include/asm-generic/ioctl.h`.
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef _ASM_GENERIC_IOCTL_H
#define _ASM_GENERIC_IOCTL_H
/* ioctl command encoding: 32 bits total, command in lower 16 bits,
* size of the parameter structure in the lower 14 bits of the
* upper 16 bits.
* Encoding the size of the parameter structure in the ioctl request
* is useful for catching programs compiled with old versions
* and to avoid overwriting user space outside the user buffer area.
@pavly-gerges
pavly-gerges / termios.h
Created May 31, 2024 09:31
/usr/include/asm-generic/termios.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef _ASM_GENERIC_TERMIOS_H
#define _ASM_GENERIC_TERMIOS_H
/*
* Most architectures have straight copies of the x86 code, with
* varying levels of bug fixes on top. Usually it's a good idea
* to use this generic version instead, but be careful to avoid
* ABI changes.
* New architectures should not provide their own version.
*/
@pavly-gerges
pavly-gerges / parport.h
Created May 31, 2024 09:09
Linux `parport.h` IOCTL Magic Macros
/*
* Any part of this program may be used in documents licensed under
* the GNU Free Documentation License, Version 1.1 or any later version
* published by the Free Software Foundation.
*/
#ifndef _PARPORT_H_
#define _PARPORT_H_
/* Start off with user-visible constants */
@pavly-gerges
pavly-gerges / free_buffer_cells.c
Created September 19, 2023 22:24
Example for freeing buffer cells of a pointer to a pointer
// Online C compiler to run C program online
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static inline void freeBufferCells(void** buffer, int count) {
for (int i = 0; i < count; i++) {
free(buffer[i]);
buffer[i] = NULL;
}