This file contains 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
app: Bforartists | |
ingredients: | |
script: | |
- mkdir -p Bforartists_appimage | |
- tar xzf ../Bforartists-Linux.tar.gz -C ./Bforartists_appimage --strip-components=1 | |
script: | |
- cp -r ../Bforartists_appimage/* ./usr/bin/; | |
- cp ./usr/bin/bforartists.svg . |
This file contains 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
# https://airbus-seclab.github.io/c-compiler-security/ | |
# TODO: Enable stricter flags for clang | |
if(CMAKE_COMPILER_IS_GNUCC) | |
target_compile_options( | |
tiny_stl | |
PRIVATE -Wdouble-promotion | |
-fno-common | |
-O2 | |
-Werror | |
-Wall |
This file contains 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
# tip: you can run Blender using an alternative Python environment to get access to PyQt6 | |
# for example I created a conda environment with PyQt6 installed, then executed blender with these args: | |
# ~/Downloads/blender-3.4.1-linux-x64/blender --env-system-python /home/iyad/miniconda3/envs/pyqt6/ | |
from PyQt6.QtWidgets import QApplication, QLabel | |
import bpy | |
# Process Qt event loop using a Blender timer | |
# note we do not use app.exec() at the end of the script, it will block Blender | |
def event_loop_timer(): |
This file contains 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
# References: | |
# https://stackoverflow.com/a/1490644/8094047 | |
# https://stackoverflow.com/a/13204738/8094047 | |
# https://developer.apple.com/documentation/objectivec/yes | |
# https://developer.apple.com/documentation/objectivec/no | |
# https://mrjean1.github.io/PyCocoa/pycocoa.oslibs-module.html | |
import ctypes | |
import ctypes.util |
This file contains 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
app: Bforartists | |
ingredients: | |
script: | |
- wget -c "https://github.com/Bforartists/Bforartists/releases/download/v${BFORARTISTS_VERSION}/Bforartists-${BFORARTISTS_VERSION}-Linux.tar.xz" | |
- mkdir -p bforartists | |
- tar xf Bforartists*.tar.xz -C ./bforartists --strip-components=1 | |
script: | |
- cp -r ../bforartists/* ./usr/bin/; |
This file contains 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
pip install pygame --only-binary :all: |
This file contains 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
python -c "from cairosvg import svg2png;svg2png(open(\"input.svg\").read(), write_to=\"output.png\")" |
This file contains 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 <SoftwareSerial.h> | |
#define LED_1 4 | |
#define LED_2 5 | |
#define LED_3 6 | |
#define LED_4 7 | |
#define LED_5 8 | |
/* Create object named bt of the class SoftwareSerial */ | |
SoftwareSerial bt(2, 3); /* (Rx,Tx) */ |
This file contains 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
// In-place partition | |
uint32_t i = parent_node.first_primitive_index; | |
uint32_t j = i + parent_node.number_of_primitives; | |
while (i < j) { | |
if (triangles[i].cached_centroid[split_axis] < split_pos) { | |
i++; | |
} else { | |
assert(j != 0); | |
j--; |
This file contains 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
// fread wrapper with error checking | |
static void fread_e(void *output, size_t size, size_t n, FILE *file) { | |
size_t num_read_items = fread(output, size, n, file); | |
if (num_read_items != n) { | |
if (ferror(file)) { | |
throw std::runtime_error("Error reading file"); | |
} else if (feof(file)) { | |
throw std::runtime_error("EOF found"); | |
} else { | |
throw std::runtime_error("Unknown file error"); |