Skip to content

Instantly share code, notes, and snippets.

View voldien's full-sized avatar

Voldie voldien

View GitHub Profile
@voldien
voldien / gameoflife.glsl
Last active February 11, 2025 08:03
Game of Life Compute Shader without any conditions - OpenGL/Vulkan
#version 460
#extension GL_ARB_separate_shader_objects : enable
#extension GL_ARB_compute_shader : enable
#extension GL_EXT_control_flow_attributes : enable
layout(local_size_x = 32, local_size_y = 32, local_size_z = 1) in;
layout(set = 0, binding = 0, r8ui) uniform restrict readonly uimage2D previousCellsTexture;
layout(set = 0, binding = 1, r8ui) uniform restrict writeonly uimage2D currentCellsTexture;
@voldien
voldien / GetOpt.java
Last active August 9, 2021 09:40
GetOpt Java
package org.getopt;
/**
* Get option from program argument.
* Its based on how the getopt in c
* is used.
*
* @author Valdemar Lindberg
*/
public class GetOpt {
@voldien
voldien / random.hs
Created October 30, 2020 13:46
Random sequence generator program
{-|
Random sequence generator program
Copyright (C) 2017 Valdemar Lindberg
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,
PROJECT(LatexProject NONE)
CMAKE_MINIMUM_REQUIRED(VERSION 3.11)
FIND_PACKAGE(LATEX)
# The directory where the final build data will be stored.
SET(LATEX_OUTPUT_PATH build)
SET(OUT_DIRECTORY "${CMAKE_SOURCE_DIR}/${LATEX_OUTPUT_PATH}")
# Directory where the source files are located.
SET( WORKINGDIR "${CMAKE_SOURCE_DIR}/src" )
@voldien
voldien / CMakeLists.txt
Last active April 29, 2025 17:23
Using CMake for creating latex build target.
PROJECT(LatexProject NONE)
CMAKE_MINIMUM_REQUIRED(VERSION 3.11)
FIND_PACKAGE(LATEX)
IF(LATEX_FOUND)
IF(LUALATEX__FOUND)
MESSAGE(STATUS "lualatex found - ${LUALATEX_COMPILER}")
ENDIF()
IF(BIBTEX_FOUND)
MESSAGE(STATUS "bibtex found - ${BIBTEX_COMPILER}")